From 71770eb790a1f0c066526bd8f84df4c5491797c0 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 14 Aug 2014 17:19:21 +0400 Subject: [PATCH] Fixed ML module build after merge --- modules/ml/include/opencv2/ml.hpp | 3 --- modules/ml/src/lr.cpp | 1 + modules/ml/test/test_lr.cpp | 2 +- samples/cpp/logistic_regression.cpp | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/ml/include/opencv2/ml.hpp b/modules/ml/include/opencv2/ml.hpp index 7f442b9f3..f6e3bf2de 100644 --- a/modules/ml/include/opencv2/ml.hpp +++ b/modules/ml/include/opencv2/ml.hpp @@ -571,8 +571,6 @@ public: /****************************************************************************************\ * Logistic Regression * \****************************************************************************************/ -namespace cv -{ struct CV_EXPORTS LogisticRegressionParams { double alpha; @@ -624,7 +622,6 @@ protected: virtual bool set_label_map(const cv::Mat& labels); static cv::Mat remap_labels(const cv::Mat& labels, const std::map& lmap); }; -}// namespace cv /****************************************************************************************\ * Auxilary functions declarations * diff --git a/modules/ml/src/lr.cpp b/modules/ml/src/lr.cpp index aa93866cc..e09a50593 100644 --- a/modules/ml/src/lr.cpp +++ b/modules/ml/src/lr.cpp @@ -57,6 +57,7 @@ using namespace cv; +using namespace cv::ml; using namespace std; LogisticRegressionParams::LogisticRegressionParams() diff --git a/modules/ml/test/test_lr.cpp b/modules/ml/test/test_lr.cpp index 3aa4cda00..90ee7b808 100644 --- a/modules/ml/test/test_lr.cpp +++ b/modules/ml/test/test_lr.cpp @@ -60,7 +60,7 @@ using namespace std; using namespace cv; - +using namespace cv::ml; static bool calculateError( const Mat& _p_labels, const Mat& _o_labels, float& error) { diff --git a/samples/cpp/logistic_regression.cpp b/samples/cpp/logistic_regression.cpp index 1ef261d4a..2ef41c0e0 100644 --- a/samples/cpp/logistic_regression.cpp +++ b/samples/cpp/logistic_regression.cpp @@ -65,7 +65,7 @@ using namespace std; using namespace cv; - +using namespace cv::ml; int main() {