diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2012-03-16 12:57:05 +0100 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2012-03-16 12:58:56 +0100 |
commit | d4509a2fda5bff72201e393f774ebfed8f0137cd (patch) | |
tree | b1fa228ec7fc27cc25b6e60c1b6bf34c86dd4d98 /ext | |
parent | 9ebacafc6ad8deb3be29f1972bd209fbb0c4c4ce (diff) | |
download | gstreamer-plugins-bad-d4509a2fda5bff72201e393f774ebfed8f0137cd.tar.gz |
opencv: use opencv prefix from pkgconfig to lookup datafiles
Don't hardconde /usr to lookup datafiles (such as haar cascades).
Diffstat (limited to 'ext')
-rw-r--r-- | ext/opencv/gstfaceblur.c | 3 | ||||
-rw-r--r-- | ext/opencv/gstfacedetect.c | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/ext/opencv/gstfaceblur.c b/ext/opencv/gstfaceblur.c index 2f9dcf544..7b801c1cc 100644 --- a/ext/opencv/gstfaceblur.c +++ b/ext/opencv/gstfaceblur.c @@ -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 diff --git a/ext/opencv/gstfacedetect.c b/ext/opencv/gstfacedetect.c index a52158b23..89079f07f 100644 --- a/ext/opencv/gstfacedetect.c +++ b/ext/opencv/gstfacedetect.c @@ -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 |