summaryrefslogtreecommitdiff
path: root/rotord/src/rotor.h
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-08-22 20:50:56 +0100
committerComment <tim@gray.(none)>2013-08-22 20:50:56 +0100
commit084697db61ba3adfee7fbd054d8d5ac7a0c62485 (patch)
treec9ab800e0e93feeceb5426830e7643f96c0f3139 /rotord/src/rotor.h
parent153fefb66f2f8495d772e7b673e3556adc00d975 (diff)
work on difference matte
Diffstat (limited to 'rotord/src/rotor.h')
-rwxr-xr-xrotord/src/rotor.h8
1 files changed, 6 insertions, 2 deletions
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 &image;
-
- //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