mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 00:58:12 +00:00
opencv: use opencv prefix from pkgconfig to lookup datafiles
Don't hardconde /usr to lookup datafiles (such as haar cascades).
This commit is contained in:
parent
9ebacafc6a
commit
d4509a2fda
3 changed files with 10 additions and 5 deletions
|
@ -1444,6 +1444,9 @@ AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [
|
|||
], [
|
||||
HAVE_OPENCV="no"
|
||||
])
|
||||
OPENCV_PREFIX="`$PKG_CONFIG --variable=prefix opencv`"
|
||||
AC_DEFINE_UNQUOTED(OPENCV_PREFIX, "$OPENCV_PREFIX", [opencv install prefix])
|
||||
AC_SUBST(OPENCV_PREFIX)
|
||||
AC_SUBST(OPENCV_CFLAGS)
|
||||
AC_SUBST(OPENCV_LIBS)
|
||||
])
|
||||
|
|
|
@ -68,7 +68,8 @@
|
|||
GST_DEBUG_CATEGORY_STATIC (gst_face_blur_debug);
|
||||
#define GST_CAT_DEFAULT gst_face_blur_debug
|
||||
|
||||
#define DEFAULT_PROFILE "/usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml"
|
||||
#define HAAR_CASCADES_DIR OPENCV_PREFIX "/share/opencv/haarcascades/"
|
||||
#define DEFAULT_PROFILE HAAR_CASCADES_DIR "haarcascade_frontalface_default.xml"
|
||||
|
||||
/* Filter signals and args */
|
||||
enum
|
||||
|
|
|
@ -82,10 +82,11 @@
|
|||
GST_DEBUG_CATEGORY_STATIC (gst_face_detect_debug);
|
||||
#define GST_CAT_DEFAULT gst_face_detect_debug
|
||||
|
||||
#define DEFAULT_FACE_PROFILE "/usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml"
|
||||
#define DEFAULT_NOSE_PROFILE "/usr/share/opencv/haarcascades/haarcascade_mcs_nose.xml"
|
||||
#define DEFAULT_MOUTH_PROFILE "/usr/share/opencv/haarcascades/haarcascade_mcs_mouth.xml"
|
||||
#define DEFAULT_EYES_PROFILE "/usr/share/opencv/haarcascades/haarcascade_mcs_eyepair_small.xml"
|
||||
#define HAAR_CASCADES_DIR OPENCV_PREFIX "/share/opencv/haarcascades/"
|
||||
#define DEFAULT_FACE_PROFILE HAAR_CASCADES_DIR "haarcascade_frontalface_default.xml"
|
||||
#define DEFAULT_NOSE_PROFILE HAAR_CASCADES_DIR "haarcascade_mcs_nose.xml"
|
||||
#define DEFAULT_MOUTH_PROFILE HAAR_CASCADES_DIR "haarcascade_mcs_mouth.xml"
|
||||
#define DEFAULT_EYES_PROFILE HAAR_CASCADES_DIR "haarcascade_mcs_eyepair_small.xml"
|
||||
#define DEFAULT_SCALE_FACTOR 1.1
|
||||
#define DEFAULT_FLAGS 0
|
||||
#define DEFAULT_MIN_NEIGHBORS 3
|
||||
|
|
Loading…
Reference in a new issue