this is my code
I really don't know what's going on with the "subtractor"...
thanks
p.s. I am using opencv310, maybe sth about the version?
1 | initial version |
this is my code
I really don't know what's going on with the "subtractor"...
thanks
p.s. I am using opencv310, maybe sth about the version?
2 | No.2 Revision |
this is my code
#include <opencv2\opencv.hpp>
using namespace cv;
int main(){
VideoCapture video(0);
Mat frame, mask, thresholdImage, output;
Ptr<BackgroundSubtractorMOG2> subtractor = cv::createBackgroundSubtractorMOG2(20, 16, true);
namedWindow("background");
while (true){
video >> frame;
subtractor(frame, mask, 0.001);
imshow("background", mask);
char c = (char)waitKey(20);
if (c == 27)
break;
}
return 0;
}
There's something wrong with "substractor". I really don't know what's going on with the "subtractor"...
thanks
p.s. I am using opencv310, maybe sth about the version?