mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
facedetect: skip detection for unavailable detectors
This commit is contained in:
parent
6fde848ada
commit
2311a0ac0e
1 changed files with 3 additions and 0 deletions
|
@ -474,6 +474,9 @@ gst_face_detect_run_detector (GstFaceDetect * filter,
|
|||
CvHaarClassifierCascade * detector, gint min_size_width,
|
||||
gint min_size_height)
|
||||
{
|
||||
if (!detector)
|
||||
return NULL;
|
||||
|
||||
return cvHaarDetectObjects (filter->cvGray, detector,
|
||||
filter->cvStorage, filter->scale_factor, filter->min_neighbors,
|
||||
filter->flags, cvSize (min_size_width, min_size_height)
|
||||
|
|
Loading…
Reference in a new issue