summaryrefslogtreecommitdiff
path: root/ext/opencv
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2018-08-02 11:19:07 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2018-08-02 11:31:34 -0400
commitd2ee9b16fa7d4d3c2ded648a7606152209813a34 (patch)
tree8db3c434753e8850b87075660d7bdeb1393a74eb /ext/opencv
parent9c91282ba64d1750c9c1500b06f826d565ace859 (diff)
downloadgstreamer-plugins-bad-d2ee9b16fa7d4d3c2ded648a7606152209813a34.tar.gz
opencv: Fixup include to follow new standard
This uses the new path for OpenCV headers. OpenCV now have master headers files per modules, which reduce the amount of required includes. Note that HIGHGUI was included to get the imgcodecs includes, which I fixed, though the master header is missing the C headers, so I included that directly. All the image stuff should be ported to C++ eventually. Finally, this patch also update the header checks to reflect the modules that are really being used.
Diffstat (limited to 'ext/opencv')
-rw-r--r--ext/opencv/MotionCells.h7
-rw-r--r--ext/opencv/gsthanddetect.h6
-rw-r--r--ext/opencv/gsttemplatematch.cpp1
-rw-r--r--ext/opencv/gsttemplatematch.h7
-rw-r--r--ext/opencv/meson.build14
5 files changed, 9 insertions, 26 deletions
diff --git a/ext/opencv/MotionCells.h b/ext/opencv/MotionCells.h
index 96b048379..6df49abb6 100644
--- a/ext/opencv/MotionCells.h
+++ b/ext/opencv/MotionCells.h
@@ -46,12 +46,7 @@
#define MOTIONCELLS_H_
#include <opencv2/core.hpp>
-#ifdef HAVE_HIGHGUI_H
-#include <highgui.h> // includes highGUI definitions
-#endif
-#ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
-#include <opencv2/highgui.hpp> // includes highGUI definitions
-#endif
+
#include <fstream>
#include <vector>
#include <glib.h>
diff --git a/ext/opencv/gsthanddetect.h b/ext/opencv/gsthanddetect.h
index c71931105..8fa0210e6 100644
--- a/ext/opencv/gsthanddetect.h
+++ b/ext/opencv/gsthanddetect.h
@@ -50,12 +50,6 @@
#include <gst/opencv/gstopencvvideofilter.h>
/* opencv */
#include <opencv2/core.hpp>
-#ifdef HAVE_HIGHGUI_H
-#include <highgui.h> // includes highGUI definitions
-#endif
-#ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
-#include <opencv2/highgui.hpp> // includes highGUI definitions
-#endif
#include <opencv2/objdetect.hpp>
G_BEGIN_DECLS
diff --git a/ext/opencv/gsttemplatematch.cpp b/ext/opencv/gsttemplatematch.cpp
index c390d1883..8b4dcf925 100644
--- a/ext/opencv/gsttemplatematch.cpp
+++ b/ext/opencv/gsttemplatematch.cpp
@@ -64,6 +64,7 @@
#include "../../gst-libs/gst/gst-i18n-plugin.h"
#include "gsttemplatematch.h"
#include <opencv2/imgproc.hpp>
+#include <opencv2/imgcodecs/imgcodecs_c.h>
GST_DEBUG_CATEGORY_STATIC (gst_template_match_debug);
#define GST_CAT_DEFAULT gst_template_match_debug
diff --git a/ext/opencv/gsttemplatematch.h b/ext/opencv/gsttemplatematch.h
index a51ef9f6c..27a5432c5 100644
--- a/ext/opencv/gsttemplatematch.h
+++ b/ext/opencv/gsttemplatematch.h
@@ -48,13 +48,6 @@
#include <gst/opencv/gstopencvvideofilter.h>
-#ifdef HAVE_HIGHGUI_H
-#include <highgui.h> // includes highGUI definitions
-#endif
-#ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
-#include <opencv2/highgui.hpp> // includes highGUI definitions
-#endif
-
G_BEGIN_DECLS
/* #defines don't like whitespacey bits */
#define GST_TYPE_TEMPLATE_MATCH \
diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
index 462756554..ff2fc98f2 100644
--- a/ext/opencv/meson.build
+++ b/ext/opencv/meson.build
@@ -29,14 +29,14 @@ gstopencv_sources = [
]
libopencv_headers = [
- 'opencv2/core/core_c.h',
- 'opencv2/core/version.hpp',
- 'opencv2/highgui/highgui_c.h',
- 'opencv2/imgproc/imgproc.hpp',
- 'opencv2/imgproc/imgproc_c.h',
- 'opencv2/objdetect/objdetect.hpp',
- 'opencv2/video/background_segm.hpp',
'opencv2/bgsegm.hpp',
+ 'opencv2/calib3d.hpp',
+ 'opencv2/core.hpp',
+ 'opencv2/imgcodecs/imgcodecs_c.h',
+ 'opencv2/imgproc.hpp',
+ 'opencv2/objdetect.hpp',
+ 'opencv2/opencv.hpp',
+ 'opencv2/video.hpp',
]
gstopencv_cargs = ['-DGST_HAAR_CASCADES_DIR="@0@"']