mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
opencv: use gst_opencv_video_filter_set_in_place()
Using the gst_base_transform function directly won't work. Need to use gst_opencv_video_filter_set_in_place().
This commit is contained in:
parent
9bb76699e0
commit
45d9184c88
8 changed files with 19 additions and 9 deletions
|
@ -155,7 +155,8 @@ gst_cv_dilate_erode_init (GstCvDilateErode * filter,
|
|||
GstCvDilateErodeClass * gclass)
|
||||
{
|
||||
filter->iterations = DEFAULT_ITERATIONS;
|
||||
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), TRUE);
|
||||
gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter),
|
||||
TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -96,7 +96,8 @@ gst_cv_equalize_hist_class_init (GstCvEqualizeHistClass * klass)
|
|||
static void
|
||||
gst_cv_equalize_hist_init (GstCvEqualizeHist * filter)
|
||||
{
|
||||
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), FALSE);
|
||||
gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter),
|
||||
FALSE);
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
|
|
@ -175,7 +175,8 @@ gst_cv_laplace_init (GstCvLaplace * filter)
|
|||
filter->scale = DEFAULT_SCALE_FACTOR;
|
||||
filter->shift = DEFAULT_SHIFT;
|
||||
|
||||
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), FALSE);
|
||||
gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter),
|
||||
FALSE);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -206,7 +206,8 @@ gst_cv_smooth_init (GstCvSmooth * filter)
|
|||
filter->colorsigma = DEFAULT_COLORSIGMA;
|
||||
filter->spatialsigma = DEFAULT_SPATIALSIGMA;
|
||||
|
||||
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), FALSE);
|
||||
gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter),
|
||||
FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -220,10 +221,12 @@ gst_cv_smooth_change_type (GstCvSmooth * filter, gint value)
|
|||
switch (value) {
|
||||
case CV_GAUSSIAN:
|
||||
case CV_BLUR:
|
||||
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), TRUE);
|
||||
gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST
|
||||
(filter), TRUE);
|
||||
break;
|
||||
default:
|
||||
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), FALSE);
|
||||
gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST
|
||||
(filter), FALSE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -158,7 +158,8 @@ gst_cv_sobel_init (GstCvSobel * filter)
|
|||
filter->y_order = DEFAULT_Y_ORDER;
|
||||
filter->aperture_size = DEFAULT_APERTURE_SIZE;
|
||||
|
||||
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), FALSE);
|
||||
gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter),
|
||||
FALSE);
|
||||
}
|
||||
|
||||
static GstCaps *
|
||||
|
|
|
@ -184,7 +184,8 @@ gst_retinex_init (GstRetinex * filter)
|
|||
filter->method = DEFAULT_METHOD;
|
||||
filter->scales = DEFAULT_SCALES;
|
||||
filter->current_scales = 0;
|
||||
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), TRUE);
|
||||
gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter),
|
||||
TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include <gst/video/gstvideofilter.h>
|
||||
#include <opencv2/core/core_c.h>
|
||||
|
||||
#include <gstopencvvideofilter.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
/* #defines don't like whitespacey bits */
|
||||
|
|
|
@ -186,7 +186,8 @@ gst_skin_detect_init (GstSkinDetect * filter)
|
|||
filter->postprocess = TRUE;
|
||||
filter->method = HSV;
|
||||
|
||||
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), FALSE);
|
||||
gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter),
|
||||
FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue