diff options
author | Luis de Bethencourt <luis@debethencourt.com> | 2015-08-07 13:08:17 +0100 |
---|---|---|
committer | Luis de Bethencourt <luis@debethencourt.com> | 2015-08-07 13:14:11 +0100 |
commit | 316657a2f85437c8866e88213e2e63967a0031b7 (patch) | |
tree | fc0328d6affb3a5f1bcfbad6c9f7ebcfa7b5f587 /ext/opencv | |
parent | 69becd734d3f94264f6f0ef2e6147205646c1abd (diff) | |
download | gstreamer-plugins-bad-316657a2f85437c8866e88213e2e63967a0031b7.tar.gz |
configure: update OpenCV requirements to 2.3.0
With facedetect ported to C++ the minimum version of OpenCV
supported is 2.3.0
https://bugzilla.gnome.org/show_bug.cgi?id=748377
Diffstat (limited to 'ext/opencv')
-rw-r--r-- | ext/opencv/gstfaceblur.c | 7 | ||||
-rw-r--r-- | ext/opencv/gstfaceblur.h | 3 | ||||
-rw-r--r-- | ext/opencv/gstfacedetect.cpp | 12 | ||||
-rw-r--r-- | ext/opencv/gstfacedetect.h | 3 | ||||
-rw-r--r-- | ext/opencv/gsthanddetect.c | 14 | ||||
-rw-r--r-- | ext/opencv/gsthanddetect.h | 2 |
6 files changed, 10 insertions, 31 deletions
diff --git a/ext/opencv/gstfaceblur.c b/ext/opencv/gstfaceblur.c index 11d914540..0cbe75633 100644 --- a/ext/opencv/gstfaceblur.c +++ b/ext/opencv/gstfaceblur.c @@ -365,11 +365,8 @@ gst_face_blur_transform_ip (GstOpencvVideoFilter * transform, faces = cvHaarDetectObjects (filter->cvGray, filter->cvCascade, filter->cvStorage, filter->scale_factor, filter->min_neighbors, - filter->flags, cvSize (filter->min_size_width, filter->min_size_height) -#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) - , cvSize (filter->min_size_width + 2, filter->min_size_height + 2) -#endif - ); + filter->flags, cvSize (filter->min_size_width, filter->min_size_height), + cvSize (filter->min_size_width + 2, filter->min_size_height + 2)); for (i = 0; i < (faces ? faces->total : 0); i++) { CvRect *r = (CvRect *) cvGetSeqElem (faces, i); diff --git a/ext/opencv/gstfaceblur.h b/ext/opencv/gstfaceblur.h index 23fa7fcbd..528064122 100644 --- a/ext/opencv/gstfaceblur.h +++ b/ext/opencv/gstfaceblur.h @@ -51,10 +51,7 @@ #include <opencv2/core/version.hpp> #include "gstopencvvideofilter.h" - -#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) #include <opencv2/objdetect/objdetect.hpp> -#endif G_BEGIN_DECLS /* #defines don't like whitespacey bits */ diff --git a/ext/opencv/gstfacedetect.cpp b/ext/opencv/gstfacedetect.cpp index 3afd72c58..ca4710c93 100644 --- a/ext/opencv/gstfacedetect.cpp +++ b/ext/opencv/gstfacedetect.cpp @@ -223,7 +223,7 @@ gst_face_detect_finalize (GObject * obj) GstFaceDetect *filter = GST_FACE_DETECT (obj); if (filter->cvGray) - cvReleaseImage(&filter->cvGray); + cvReleaseImage (&filter->cvGray); if (filter->cvStorage) cvReleaseMemStorage (&filter->cvStorage); @@ -501,7 +501,7 @@ gst_face_detect_set_caps (GstOpencvVideoFilter * transform, gint in_width, filter = GST_FACE_DETECT (transform); if (filter->cvGray) - cvReleaseImage(&filter->cvGray); + cvReleaseImage (&filter->cvGray); filter->cvGray = cvCreateImage (cvSize (in_width, in_height), IPL_DEPTH_8U, 1); @@ -550,11 +550,7 @@ gst_face_detect_run_detector (GstFaceDetect * filter, Mat roi (filter->cvGray, r); detector->detectMultiScale (roi, faces, filter->scale_factor, filter->min_neighbors, filter->flags, cvSize (min_size_width, - min_size_height) -#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) - , cvSize (0, 0) -#endif - ); + min_size_height), cvSize (0, 0)); } else { GST_LOG_OBJECT (filter, "Calculated stddev %f lesser than min_stddev %d, detection not performed", @@ -806,7 +802,7 @@ gst_face_detect_load_profile (GstFaceDetect * filter, gchar * profile) CascadeClassifier *cascade; if (profile == NULL) - return NULL; + return NULL; cascade = new CascadeClassifier (profile); return cascade; diff --git a/ext/opencv/gstfacedetect.h b/ext/opencv/gstfacedetect.h index f5ad14dbc..f24df0c61 100644 --- a/ext/opencv/gstfacedetect.h +++ b/ext/opencv/gstfacedetect.h @@ -52,10 +52,7 @@ #include <opencv2/core/version.hpp> #include <cv.h> #include "gstopencvvideofilter.h" - -#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) #include <opencv2/objdetect/objdetect.hpp> -#endif G_BEGIN_DECLS /* #defines don't like whitespacey bits */ diff --git a/ext/opencv/gsthanddetect.c b/ext/opencv/gsthanddetect.c index 8c72b72e4..762f5fb9e 100644 --- a/ext/opencv/gsthanddetect.c +++ b/ext/opencv/gsthanddetect.c @@ -404,11 +404,8 @@ gst_handdetect_transform_ip (GstOpencvVideoFilter * transform, /* detect FIST gesture fist */ hands = cvHaarDetectObjects (filter->cvGray, filter->cvCascade_fist, - filter->cvStorage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24) -#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) - , cvSize (0, 0) -#endif - ); + filter->cvStorage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24), + cvSize (0, 0)); /* if FIST gesture detected */ if (hands && hands->total > 0) { @@ -496,11 +493,8 @@ gst_handdetect_transform_ip (GstOpencvVideoFilter * transform, /* if NO FIST gesture, detecting PALM gesture */ hands = cvHaarDetectObjects (filter->cvGray, filter->cvCascade_palm, - filter->cvStorage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24) -#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) - , cvSize (0, 0) -#endif - ); + filter->cvStorage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24), + cvSize (0, 0)); /* if PALM detected */ if (hands && hands->total > 0) { int min_distance, distance; diff --git a/ext/opencv/gsthanddetect.h b/ext/opencv/gsthanddetect.h index e57f56737..aafe1ad87 100644 --- a/ext/opencv/gsthanddetect.h +++ b/ext/opencv/gsthanddetect.h @@ -58,9 +58,7 @@ #ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H #include <opencv2/highgui/highgui_c.h> // includes highGUI definitions #endif -#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) #include <opencv2/objdetect/objdetect.hpp> -#endif G_BEGIN_DECLS /* #defines don't like whitespacey bits */ |