From d3b6b8c64f3e7d2d8decdcd41f83777a3ee2b28f Mon Sep 17 00:00:00 2001 From: Vanessa Chipirras Navalon Date: Tue, 26 Jan 2016 16:52:37 +0100 Subject: [PATCH] opencv: gstcvsmooth: Ported to OpenCV version 3.1 cvarrToMat() is added because it is compatible with all versions of Opencv and the use the class constructor Mat is eliminated because is deprecated in 3.X versions. This keeps compatibility with 2.4. https://bugzilla.gnome.org/show_bug.cgi?id=760473 --- ext/opencv/gstcvsmooth.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/opencv/gstcvsmooth.cpp b/ext/opencv/gstcvsmooth.cpp index 8715736969..f9a8a02bb0 100644 --- a/ext/opencv/gstcvsmooth.cpp +++ b/ext/opencv/gstcvsmooth.cpp @@ -317,18 +317,18 @@ gst_cv_smooth_transform_ip (GstOpencvVideoFilter * base, GstBuffer * buf, switch (filter->type) { case CV_BLUR: - blur (Mat (img), Mat (img), Size (filter->width, filter->height), + blur (cvarrToMat(img), cvarrToMat(img), Size (filter->width, filter->height), Point (-1, -1)); break; case CV_GAUSSIAN: - GaussianBlur (Mat (img), Mat (img), Size (filter->width, filter->height), + GaussianBlur (cvarrToMat(img), cvarrToMat(img), Size (filter->width, filter->height), filter->colorsigma, filter->colorsigma); break; case CV_MEDIAN: - medianBlur (Mat (img), Mat (img), filter->width); + medianBlur (cvarrToMat(img), cvarrToMat(img), filter->width); break; case CV_BILATERAL: - bilateralFilter (Mat (img), Mat (img), -1, filter->colorsigma, 0.0); + bilateralFilter (cvarrToMat(img), cvarrToMat(img), -1, filter->colorsigma, 0.0); break; default: break;