mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
faceblur: Change gstfaceblur to C++.
Change the gstfaceblur.c file to cpp and add it into Makefile. It is necessary to migrate the faceblur plugin to C++, in order to load new and old classifiers, to make faceblur work with newer versions of Opencv. https://bugzilla.gnome.org/show_bug.cgi?id=753994
This commit is contained in:
parent
50fc332ab5
commit
6193f52f2d
2 changed files with 10 additions and 9 deletions
|
@ -12,7 +12,7 @@ libgstopencv_la_SOURCES = gstopencv.cpp \
|
||||||
gstcvsmooth.c \
|
gstcvsmooth.c \
|
||||||
gstcvsobel.c \
|
gstcvsobel.c \
|
||||||
gstedgedetect.c \
|
gstedgedetect.c \
|
||||||
gstfaceblur.c \
|
gstfaceblur.cpp \
|
||||||
gsthanddetect.c \
|
gsthanddetect.c \
|
||||||
gstpyramidsegment.c \
|
gstpyramidsegment.c \
|
||||||
gsttemplatematch.c \
|
gsttemplatematch.c \
|
||||||
|
|
|
@ -197,29 +197,30 @@ gst_face_blur_class_init (GstFaceBlurClass * klass)
|
||||||
g_object_class_install_property (gobject_class, PROP_PROFILE,
|
g_object_class_install_property (gobject_class, PROP_PROFILE,
|
||||||
g_param_spec_string ("profile", "Profile",
|
g_param_spec_string ("profile", "Profile",
|
||||||
"Location of Haar cascade file to use for face blurion",
|
"Location of Haar cascade file to use for face blurion",
|
||||||
DEFAULT_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
DEFAULT_PROFILE,
|
||||||
|
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||||
g_object_class_install_property (gobject_class, PROP_FLAGS,
|
g_object_class_install_property (gobject_class, PROP_FLAGS,
|
||||||
g_param_spec_flags ("flags", "Flags", "Flags to cvHaarDetectObjects",
|
g_param_spec_flags ("flags", "Flags", "Flags to cvHaarDetectObjects",
|
||||||
GST_TYPE_OPENCV_FACE_BLUR_FLAGS, DEFAULT_FLAGS,
|
GST_TYPE_OPENCV_FACE_BLUR_FLAGS, DEFAULT_FLAGS,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||||
g_object_class_install_property (gobject_class, PROP_SCALE_FACTOR,
|
g_object_class_install_property (gobject_class, PROP_SCALE_FACTOR,
|
||||||
g_param_spec_double ("scale-factor", "Scale factor",
|
g_param_spec_double ("scale-factor", "Scale factor",
|
||||||
"Factor by which the windows is scaled after each scan",
|
"Factor by which the windows is scaled after each scan", 1.1, 10.0,
|
||||||
1.1, 10.0, DEFAULT_SCALE_FACTOR,
|
DEFAULT_SCALE_FACTOR,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||||
g_object_class_install_property (gobject_class, PROP_MIN_NEIGHBORS,
|
g_object_class_install_property (gobject_class, PROP_MIN_NEIGHBORS,
|
||||||
g_param_spec_int ("min-neighbors", "Mininum neighbors",
|
g_param_spec_int ("min-neighbors", "Mininum neighbors",
|
||||||
"Minimum number (minus 1) of neighbor rectangles that makes up "
|
"Minimum number (minus 1) of neighbor rectangles that makes up "
|
||||||
"an object", 0, G_MAXINT, DEFAULT_MIN_NEIGHBORS,
|
"an object", 0, G_MAXINT, DEFAULT_MIN_NEIGHBORS,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||||
g_object_class_install_property (gobject_class, PROP_MIN_SIZE_WIDTH,
|
g_object_class_install_property (gobject_class, PROP_MIN_SIZE_WIDTH,
|
||||||
g_param_spec_int ("min-size-width", "Minimum size width",
|
g_param_spec_int ("min-size-width", "Minimum size width",
|
||||||
"Minimum window width size", 0, G_MAXINT, DEFAULT_MIN_SIZE_WIDTH,
|
"Minimum window width size", 0, G_MAXINT, DEFAULT_MIN_SIZE_WIDTH,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||||
g_object_class_install_property (gobject_class, PROP_MIN_SIZE_HEIGHT,
|
g_object_class_install_property (gobject_class, PROP_MIN_SIZE_HEIGHT,
|
||||||
g_param_spec_int ("min-size-height", "Minimum size height",
|
g_param_spec_int ("min-size-height", "Minimum size height",
|
||||||
"Minimum window height size", 0, G_MAXINT, DEFAULT_MIN_SIZE_HEIGHT,
|
"Minimum window height size", 0, G_MAXINT, DEFAULT_MIN_SIZE_HEIGHT,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||||
|
|
||||||
gst_element_class_set_static_metadata (element_class,
|
gst_element_class_set_static_metadata (element_class,
|
||||||
"faceblur",
|
"faceblur",
|
Loading…
Reference in a new issue