mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +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 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 seem to be a switch to suppress the warnings the cvcompat.h header
|
||||||
dnl causes.)
|
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_PROG_CXX
|
||||||
AC_LANG([C++])
|
AC_LANG([C++])
|
||||||
OLD_CPPFLAGS=$CPPFLAGS
|
OLD_CPPFLAGS=$CPPFLAGS
|
||||||
|
|
|
@ -365,11 +365,8 @@ gst_face_blur_transform_ip (GstOpencvVideoFilter * transform,
|
||||||
faces =
|
faces =
|
||||||
cvHaarDetectObjects (filter->cvGray, filter->cvCascade,
|
cvHaarDetectObjects (filter->cvGray, filter->cvCascade,
|
||||||
filter->cvStorage, filter->scale_factor, filter->min_neighbors,
|
filter->cvStorage, filter->scale_factor, filter->min_neighbors,
|
||||||
filter->flags, cvSize (filter->min_size_width, filter->min_size_height)
|
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));
|
||||||
, cvSize (filter->min_size_width + 2, filter->min_size_height + 2)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
|
|
||||||
for (i = 0; i < (faces ? faces->total : 0); i++) {
|
for (i = 0; i < (faces ? faces->total : 0); i++) {
|
||||||
CvRect *r = (CvRect *) cvGetSeqElem (faces, i);
|
CvRect *r = (CvRect *) cvGetSeqElem (faces, i);
|
||||||
|
|
|
@ -51,10 +51,7 @@
|
||||||
#include <opencv2/core/version.hpp>
|
#include <opencv2/core/version.hpp>
|
||||||
|
|
||||||
#include "gstopencvvideofilter.h"
|
#include "gstopencvvideofilter.h"
|
||||||
|
|
||||||
#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
|
|
||||||
#include <opencv2/objdetect/objdetect.hpp>
|
#include <opencv2/objdetect/objdetect.hpp>
|
||||||
#endif
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
/* #defines don't like whitespacey bits */
|
/* #defines don't like whitespacey bits */
|
||||||
|
|
|
@ -550,11 +550,7 @@ gst_face_detect_run_detector (GstFaceDetect * filter,
|
||||||
Mat roi (filter->cvGray, r);
|
Mat roi (filter->cvGray, r);
|
||||||
detector->detectMultiScale (roi, faces, filter->scale_factor,
|
detector->detectMultiScale (roi, faces, filter->scale_factor,
|
||||||
filter->min_neighbors, filter->flags, cvSize (min_size_width,
|
filter->min_neighbors, filter->flags, cvSize (min_size_width,
|
||||||
min_size_height)
|
min_size_height), cvSize (0, 0));
|
||||||
#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
|
|
||||||
, cvSize (0, 0)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
GST_LOG_OBJECT (filter,
|
GST_LOG_OBJECT (filter,
|
||||||
"Calculated stddev %f lesser than min_stddev %d, detection not performed",
|
"Calculated stddev %f lesser than min_stddev %d, detection not performed",
|
||||||
|
|
|
@ -52,10 +52,7 @@
|
||||||
#include <opencv2/core/version.hpp>
|
#include <opencv2/core/version.hpp>
|
||||||
#include <cv.h>
|
#include <cv.h>
|
||||||
#include "gstopencvvideofilter.h"
|
#include "gstopencvvideofilter.h"
|
||||||
|
|
||||||
#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
|
|
||||||
#include <opencv2/objdetect/objdetect.hpp>
|
#include <opencv2/objdetect/objdetect.hpp>
|
||||||
#endif
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
/* #defines don't like whitespacey bits */
|
/* #defines don't like whitespacey bits */
|
||||||
|
|
|
@ -404,11 +404,8 @@ gst_handdetect_transform_ip (GstOpencvVideoFilter * transform,
|
||||||
/* detect FIST gesture fist */
|
/* detect FIST gesture fist */
|
||||||
hands =
|
hands =
|
||||||
cvHaarDetectObjects (filter->cvGray, filter->cvCascade_fist,
|
cvHaarDetectObjects (filter->cvGray, filter->cvCascade_fist,
|
||||||
filter->cvStorage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24)
|
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));
|
||||||
, cvSize (0, 0)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
|
|
||||||
/* if FIST gesture detected */
|
/* if FIST gesture detected */
|
||||||
if (hands && hands->total > 0) {
|
if (hands && hands->total > 0) {
|
||||||
|
@ -496,11 +493,8 @@ gst_handdetect_transform_ip (GstOpencvVideoFilter * transform,
|
||||||
/* if NO FIST gesture, detecting PALM gesture */
|
/* if NO FIST gesture, detecting PALM gesture */
|
||||||
hands =
|
hands =
|
||||||
cvHaarDetectObjects (filter->cvGray, filter->cvCascade_palm,
|
cvHaarDetectObjects (filter->cvGray, filter->cvCascade_palm,
|
||||||
filter->cvStorage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24)
|
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));
|
||||||
, cvSize (0, 0)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
/* if PALM detected */
|
/* if PALM detected */
|
||||||
if (hands && hands->total > 0) {
|
if (hands && hands->total > 0) {
|
||||||
int min_distance, distance;
|
int min_distance, distance;
|
||||||
|
|
|
@ -58,9 +58,7 @@
|
||||||
#ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
|
#ifdef HAVE_OPENCV2_HIGHGUI_HIGHGUI_C_H
|
||||||
#include <opencv2/highgui/highgui_c.h> // includes highGUI definitions
|
#include <opencv2/highgui/highgui_c.h> // includes highGUI definitions
|
||||||
#endif
|
#endif
|
||||||
#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
|
|
||||||
#include <opencv2/objdetect/objdetect.hpp>
|
#include <opencv2/objdetect/objdetect.hpp>
|
||||||
#endif
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
/* #defines don't like whitespacey bits */
|
/* #defines don't like whitespacey bits */
|
||||||
|
|
Loading…
Reference in a new issue