diff options
-rw-r--r-- | configure.ac | 2 | ||||
-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 |
7 files changed, 11 insertions, 32 deletions
diff --git a/configure.ac b/configure.ac index 1e1ad87de..10d39373d 100644 --- a/configure.ac +++ b/configure.ac @@ -2453,7 +2453,7 @@ AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [ dnl a new version and the no-backward-compatibility define. (There doesn't dnl seem to be a switch to suppress the warnings the cvcompat.h header dnl causes.) - PKG_CHECK_MODULES(OPENCV, opencv >= 2.0.0 opencv < 2.5.0 , [ + PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.0 opencv < 2.5.0 , [ AC_PROG_CXX AC_LANG([C++]) OLD_CPPFLAGS=$CPPFLAGS 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 */ |