mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
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
This commit is contained in:
parent
69becd734d
commit
316657a2f8
7 changed files with 11 additions and 32 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue