From 084697db61ba3adfee7fbd054d8d5ac7a0c62485 Mon Sep 17 00:00:00 2001 From: Comment Date: Thu, 22 Aug 2013 20:50:56 +0100 Subject: work on difference matte --- rotord/src/rotor.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'rotord/src/rotor.h') diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 6b80762..2549683 100755 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -808,6 +808,7 @@ namespace Rotor { if (in1){ Image *in2=image_inputs[1]->get(frame); if (in2) { + cv::cvtColor(in1->rgb,greyfg,CV_RGB2GRAY); cv::cvtColor(in2->rgb,greybg,CV_RGB2GRAY); cv::absdiff(greyfg,greybg,greyDiff); @@ -822,8 +823,10 @@ namespace Rotor { } else image.alpha_from_cv(mask); return ℑ - - //cv::cvtColor + + //cv::cvtColor(in1->rgb, hsv1, CV_RGB2HSV); + //cv::cvtColor(in2->rgb, hsv2, CV_RGB2HSV); + } //if there aren't 2 image inputs connected just return the first return in1; @@ -832,6 +835,7 @@ namespace Rotor { } private: cv::Mat greyfg,greybg,greyDiff,mask; + cv::Mat hsv1,hsv2; }; #define VIDEOFRAMES_frame 1 #define VIDEOFRAMES_blend 2 -- cgit v1.2.3