From 4b60b470754f7ed17c51e70e48f7f559a2592ed4 Mon Sep 17 00:00:00 2001 From: Vanessa Chipirras Navalon Date: Mon, 1 Feb 2016 13:58:49 +0100 Subject: [PATCH] opencv: skindetect: Ported to OpenCV version 3.1 cvCVPixToPlane() has been deprecated in OpenCV 3.0, and there is function to replace it cvSplit(). The include compat.hpp is deleted because in 3.X versions doen't exist and it isn't necessary for 2.4.X versions in this element. This keeps compatibility with 2.4. https://bugzilla.gnome.org/show_bug.cgi?id=760473 --- ext/opencv/gstskindetect.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/opencv/gstskindetect.cpp b/ext/opencv/gstskindetect.cpp index ad81a384a1..e2fcb59205 100644 --- a/ext/opencv/gstskindetect.cpp +++ b/ext/opencv/gstskindetect.cpp @@ -60,7 +60,6 @@ #include "gstskindetect.h" #include -#include GST_DEBUG_CATEGORY_STATIC (gst_skin_detect_debug); #define GST_CAT_DEFAULT gst_skin_detect_debug @@ -339,7 +338,7 @@ gst_skin_detect_transform (GstOpencvVideoFilter * base, GstBuffer * buf, cvCvtColor (filter->cvSkinPixels1, filter->cvRGB, CV_GRAY2RGB); } else if (RGB == filter->method) { - cvCvtPixToPlane (filter->cvRGB, filter->cvR, filter->cvG, filter->cvB, 0); /* Extract the 3 color components. */ + cvSplit (filter->cvRGB, filter->cvR, filter->cvG, filter->cvB, 0); /* Extract the 3 color components. */ cvAdd (filter->cvR, filter->cvG, filter->cvAll, NULL); cvAdd (filter->cvB, filter->cvAll, filter->cvAll, NULL); /* All = R + G + B */ cvDiv (filter->cvR, filter->cvAll, filter->cvRp, 1.0); /* R' = R / ( R + G + B) */