diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c5746b974eb8adb3246050d7373098905888bf3..44376dd0a2df8b0c708ecbf208da60d55715d0d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,10 +234,9 @@ OPTION(OTB_USE_OPENCV "Use OpenCV library for classification." OFF) MARK_AS_ADVANCED(OTB_USE_OPENCV) IF(OTB_USE_OPENCV) FIND_PACKAGE(OpenCV) - STRING(REPLACE "opencv" "opencv2" OpenCV2_INCLUDE_DIRS "${OpenCV_INCLUDE_DIRS}") - MESSAGE("Found OpenCV ${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH}") - MESSAGE("Include directory: ${OpenCV2_INCLUDE_DIRS}") - INCLUDE_DIRECTORIES(${OpenCV2_INCLUDE_DIRS}) + MESSAGE(STATUS "Found OpenCV ${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH}") + MESSAGE(STATUS "OpenCV include directory: ${OpenCV_INCLUDE_DIRS}") + INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS}) ENDIF(OTB_USE_OPENCV) INCLUDE_DIRECTORIES ( diff --git a/Code/UtilitiesAdapters/OpenCV/otbBoostMachineLearningModel.h b/Code/UtilitiesAdapters/OpenCV/otbBoostMachineLearningModel.h index dfa7b12eed4b99ff4fe140d727e8297b0b73ecca..5c4b64a436b74d196c0b7fb27a3e1cd9cfe044f5 100644 --- a/Code/UtilitiesAdapters/OpenCV/otbBoostMachineLearningModel.h +++ b/Code/UtilitiesAdapters/OpenCV/otbBoostMachineLearningModel.h @@ -24,9 +24,7 @@ #include "itkListSample.h" #include "otbMachineLearningModel.h" -//include opencv -#include <cv.h> // opencv general include file -#include <ml.h> // opencv machine learning include file +#include <opencv2/opencv.hpp> namespace otb { diff --git a/Code/UtilitiesAdapters/OpenCV/otbKNearestNeighborsMachineLearningModel.h b/Code/UtilitiesAdapters/OpenCV/otbKNearestNeighborsMachineLearningModel.h index 3b618d5dc45b81fbd14c73e9e2808ec729aa6840..c77ef4a5a8280d404efb869530dab79a937874ca 100644 --- a/Code/UtilitiesAdapters/OpenCV/otbKNearestNeighborsMachineLearningModel.h +++ b/Code/UtilitiesAdapters/OpenCV/otbKNearestNeighborsMachineLearningModel.h @@ -24,9 +24,7 @@ #include "itkListSample.h" #include "otbMachineLearningModel.h" -//include opencv -#include <opencv.hpp> // opencv general include file -#include <ml/ml.hpp> // opencv machine learning include file +#include <opencv2/opencv.hpp> namespace otb { diff --git a/Code/UtilitiesAdapters/OpenCV/otbLibSVMMachineLearningModel.h b/Code/UtilitiesAdapters/OpenCV/otbLibSVMMachineLearningModel.h index 75239759a60cb8f361711fab9ad8eb175e4d0ae5..392352d5a298127505e9a4be2b3e12879231722f 100644 --- a/Code/UtilitiesAdapters/OpenCV/otbLibSVMMachineLearningModel.h +++ b/Code/UtilitiesAdapters/OpenCV/otbLibSVMMachineLearningModel.h @@ -24,10 +24,6 @@ #include "itkListSample.h" #include "otbMachineLearningModel.h" -//include opencv -//#include <opencv.hpp> // opencv general include file -//#include <ml/ml.hpp> // opencv machine learning include file - // SVM estimator #include "otbSVMSampleListModelEstimator.h" // Validation diff --git a/Code/UtilitiesAdapters/OpenCV/otbOpenCVUtils.h b/Code/UtilitiesAdapters/OpenCV/otbOpenCVUtils.h index 12c829d5de52d74d80d29c64bff4e29f0b8a7f57..6743a675047fbd683a9660fc07f6f32273090332 100644 --- a/Code/UtilitiesAdapters/OpenCV/otbOpenCVUtils.h +++ b/Code/UtilitiesAdapters/OpenCV/otbOpenCVUtils.h @@ -18,7 +18,7 @@ #ifndef __otbOpenCVUtils_h #define __otbOpenCVUtils_h -#include "ml/ml.hpp" +#include <opencv2/opencv.hpp> #include "itkPixelBuilder.h" namespace otb diff --git a/Code/UtilitiesAdapters/OpenCV/otbRandomForestsMachineLearningModel.h b/Code/UtilitiesAdapters/OpenCV/otbRandomForestsMachineLearningModel.h index 4e9c0dfd6e95e8926e67d3112d044c49c77806c8..12a8e60c36ec829470d35f1da611db06a1213adf 100644 --- a/Code/UtilitiesAdapters/OpenCV/otbRandomForestsMachineLearningModel.h +++ b/Code/UtilitiesAdapters/OpenCV/otbRandomForestsMachineLearningModel.h @@ -24,9 +24,7 @@ #include "itkListSample.h" #include "otbMachineLearningModel.h" -//include opencv -#include <opencv.hpp> // opencv general include file -#include <ml/ml.hpp> // opencv machine learning include file +#include <opencv2/opencv.hpp> // opencv general include file namespace otb { diff --git a/Code/UtilitiesAdapters/OpenCV/otbSVMMachineLearningModel.h b/Code/UtilitiesAdapters/OpenCV/otbSVMMachineLearningModel.h index e0c0101c94a026647f21fd9e7f58c0c0f716ecac..74e232955caf235aca42638a8ba648bf77c811dc 100644 --- a/Code/UtilitiesAdapters/OpenCV/otbSVMMachineLearningModel.h +++ b/Code/UtilitiesAdapters/OpenCV/otbSVMMachineLearningModel.h @@ -25,9 +25,7 @@ #include "itkListSample.h" #include "otbMachineLearningModel.h" -//include opencv -#include <opencv.hpp> // opencv general include file -#include <ml/ml.hpp> // opencv machine learning include file +#include <opencv2/opencv.hpp> // opencv general include file namespace otb {