mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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:
parent
0a08e771d4
commit
d3b6b8c64f
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue