mirror of https://github.com/CGAL/cgal
Classification: Fix OpenCV includes (#4241)
Classification: Fix OpenCV includes Co-authored-by: Maxime GIMENO <maxime.gimeno@gmail.com>
This commit is contained in:
commit
5e64fde466
|
|
@ -18,7 +18,7 @@ do
|
||||||
DONE=1 && sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.6 zsh \
|
DONE=1 && sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.6 zsh \
|
||||||
flex bison cmake graphviz libgmp-dev libmpfr-dev libmpfi-dev zlib1g-dev libeigen3-dev libboost1.55-dev \
|
flex bison cmake graphviz libgmp-dev libmpfr-dev libmpfi-dev zlib1g-dev libeigen3-dev libboost1.55-dev \
|
||||||
libboost-system1.55-dev libboost-program-options1.55-dev libboost-thread1.55-dev libboost-iostreams1.55-dev \
|
libboost-system1.55-dev libboost-program-options1.55-dev libboost-thread1.55-dev libboost-iostreams1.55-dev \
|
||||||
qt55base qt55script qt55svg qt55tools qt55graphicaleffects libopencv-dev mesa-common-dev libmetis-dev libglu1-mesa-dev \
|
qt55base qt55script qt55svg qt55tools qt55graphicaleffects libopencv-dev libopencv-ml-dev mesa-common-dev libmetis-dev libglu1-mesa-dev \
|
||||||
|| DONE=0 && sudo apt-get update
|
|| DONE=0 && sudo apt-get update
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,23 @@
|
||||||
|
|
||||||
#include <CGAL/Classification/Feature_set.h>
|
#include <CGAL/Classification/Feature_set.h>
|
||||||
#include <CGAL/Classification/Label_set.h>
|
#include <CGAL/Classification/Label_set.h>
|
||||||
#if (CV_MAJOR_VERSION < 3)
|
|
||||||
#include <cv.h>
|
#include <opencv2/opencv.hpp>
|
||||||
#include <ml.h>
|
|
||||||
|
//In opencv version 2.X the first digit is named EPOCH,
|
||||||
|
//until version 3.0 where EPOCH disappears and it becomes MAJOR. Hence this
|
||||||
|
//weird condition
|
||||||
|
#ifdef CV_VERSION_EPOCH
|
||||||
|
#if CV_VERSION_MAJOR == 4 && CV_VERSION_MINOR>= 11
|
||||||
|
#include <opencv2/ml.hpp>
|
||||||
|
#else
|
||||||
|
#include <opencv2/ml/ml.hpp>
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <opencv/cv.h>
|
#include <opencv2/ml.hpp>
|
||||||
#include <opencv/ml.h>
|
#endif`
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue