+ #if defined(_MSC_VER) && (_MSC_VER >= 1800)
+ // eliminating duplicated round() declaration
+ #define HAVE_ROUND
+ #endif
+
#include <Python.h>
-#if !PYTHON_USE_NUMPY
-#error "The module can only be built if NumPy is available"
-#endif
-
#define MODULESTR "cv2"
-
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
-#include "numpy/ndarrayobject.h"
+#include <numpy/ndarrayobject.h>
-#include "opencv2/core/core.hpp"
-#include "opencv2/contrib/contrib.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/core/utility.hpp"
+#include "opencv2/contrib.hpp"
#include "opencv2/flann/miniflann.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/ml/ml.hpp"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/video/tracking.hpp"
-#include "opencv2/video/background_segm.hpp"
-#include "opencv2/photo/photo.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/softcascade.hpp"
+#include "opencv2/video.hpp"
+#include "opencv2/photo.hpp"
+#include "opencv2/highgui.hpp"
-#include "opencv2/opencv_modules.hpp"
+#include "opencv2/ml.hpp"
+#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_NONFREE
-# include "opencv2/nonfree/nonfree.hpp"
+# include "opencv2/nonfree.hpp"
#endif
+#include "pycompat.hpp"
+
using cv::flann::IndexParams;
using cv::flann::SearchParams;