]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/ShapeRecognition/ShapeRec_FeatureDetector.hxx
Salome HOME
Copyright update 2022
[modules/geom.git] / src / ShapeRecognition / ShapeRec_FeatureDetector.hxx
index b683c7c6958bb8e8f549f16c828cb4e6dc20f648..981b6f1ea3908308efd2d756887988cf8d1b63ff 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 // Author : Renaud NEDELEC, Open CASCADE S.A.S.
 
 // OpenCV includes
-#include <cv.h>
-#include <highgui.h>
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/highgui/highgui.hpp>
+// RNV: Workaround: HAVE_TBB definition from OCCT conflicts with OPENCV, undef it.
+//      This workaround will be removed after correction of the
+//      https://tracker.dev.opencascade.org/view.php?id=28457 issue.
+#ifdef HAVE_TBB
+#undef HAVE_TBB
+#include <opencv2/opencv.hpp>
+#define HAVE_TBB
+#else
+#include <opencv2/opencv.hpp>
+#endif
 
 // Qt
 #include <QRect>
 
-class ShapeRec_Parameters
+#ifdef WIN32
+  #if defined GEOM_SHAPEREC_EXPORTS || defined GEOMShapeRec_EXPORTS
+    #define GEOM_SHAPEREC_EXPORT __declspec( dllexport )
+  #else
+    #define GEOM_SHAPEREC_EXPORT __declspec( dllimport )
+  #endif
+#else
+   #define GEOM_SHAPEREC_EXPORT
+#endif
+
+class GEOM_SHAPEREC_EXPORT ShapeRec_Parameters
 {
 public:
   ShapeRec_Parameters();
@@ -42,7 +58,7 @@ public:
   int findContoursMethod;
 };
 
-class ShapeRec_CornersParameters : public ShapeRec_Parameters
+class GEOM_SHAPEREC_EXPORT ShapeRec_CornersParameters : public ShapeRec_Parameters
 {
 public:
   ShapeRec_CornersParameters();
@@ -55,7 +71,7 @@ public:
   double epsilon;
 };
 
-class ShapeRec_CannyParameters : public ShapeRec_Parameters
+class GEOM_SHAPEREC_EXPORT ShapeRec_CannyParameters : public ShapeRec_Parameters
 {
 public:
   ShapeRec_CannyParameters();
@@ -66,7 +82,7 @@ public:
   bool L2gradient;
 };
 
-class ShapeRec_ColorFilterParameters : public ShapeRec_Parameters
+class GEOM_SHAPEREC_EXPORT ShapeRec_ColorFilterParameters : public ShapeRec_Parameters
 {
 public:
   ShapeRec_ColorFilterParameters();
@@ -79,7 +95,7 @@ public:
   double maxThreshold;
 };
 
-class ShapeRec_FeatureDetector
+class GEOM_SHAPEREC_EXPORT ShapeRec_FeatureDetector
 {
 public: