mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-07 12:21:17 +00:00
opencv: support alternative path convention
Some distributions store OpenCV files in /usr/share/opencv and some others (and default when building from source) install them in /usr/share/OpenCV. Support both to find cascade files. https://bugzilla.gnome.org/show_bug.cgi?id=753651
This commit is contained in:
parent
dce7ffb04e
commit
07ee52db5d
3 changed files with 5 additions and 2 deletions
|
@ -2487,6 +2487,9 @@ AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [
|
|||
AC_SUBST(OPENCV_PREFIX)
|
||||
AC_SUBST(OPENCV_CFLAGS)
|
||||
AC_SUBST(OPENCV_LIBS)
|
||||
AC_CHECK_FILE([$OPENCV_PREFIX/share/opencv/],
|
||||
[AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["opencv"], [OpenCV path name])],
|
||||
[AC_DEFINE_UNQUOTED(OPENCV_PATH_NAME, ["OpenCV"], [OpenCV path name])])
|
||||
])
|
||||
|
||||
dnl *** OpenEXR ***
|
||||
|
|
|
@ -71,7 +71,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_face_blur_debug);
|
|||
#define GST_CAT_DEFAULT gst_face_blur_debug
|
||||
|
||||
#define DEFAULT_PROFILE OPENCV_PREFIX G_DIR_SEPARATOR_S "share" \
|
||||
G_DIR_SEPARATOR_S "opencv" G_DIR_SEPARATOR_S "haarcascades" \
|
||||
G_DIR_SEPARATOR_S OPENCV_PATH_NAME G_DIR_SEPARATOR_S "haarcascades" \
|
||||
G_DIR_SEPARATOR_S "haarcascade_frontalface_default.xml"
|
||||
#define DEFAULT_SCALE_FACTOR 1.25
|
||||
#define DEFAULT_FLAGS CV_HAAR_DO_CANNY_PRUNING
|
||||
|
|
|
@ -88,7 +88,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_face_detect_debug);
|
|||
#define GST_CAT_DEFAULT gst_face_detect_debug
|
||||
|
||||
#define HAAR_CASCADES_DIR OPENCV_PREFIX G_DIR_SEPARATOR_S "share" \
|
||||
G_DIR_SEPARATOR_S "opencv" G_DIR_SEPARATOR_S "haarcascades" \
|
||||
G_DIR_SEPARATOR_S OPENCV_PATH_NAME G_DIR_SEPARATOR_S "haarcascades" \
|
||||
G_DIR_SEPARATOR_S
|
||||
#define DEFAULT_FACE_PROFILE HAAR_CASCADES_DIR "haarcascade_frontalface_default.xml"
|
||||
#define DEFAULT_NOSE_PROFILE HAAR_CASCADES_DIR "haarcascade_mcs_nose.xml"
|
||||
|
|
Loading…
Reference in a new issue