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
This commit is contained in:
Vanessa Chipirras Navalon 2016-01-26 16:52:37 +01:00 committed by Luis de Bethencourt
parent 0a08e771d4
commit d3b6b8c64f

View file

@ -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;