c++ - Tuning background subtraction with OpenCV -


my question final paragraph.

i trying use 1 of opencv's background subtractors means of detecting human hands. code tries follows:

cv::ptr<cv::backgroundsubtractor> pmog2 = cv::createbackgroundsubtractormog2(); cv::mat fgmaskmog2; pmog2->apply(input, fgmaskmog2, -1); cv::namedwindow("fg mask mog 2"); cv::imshow("fg mask mog 2", fgmaskmog2); 

when ran program on own test video greeted (ignore name of right window): the left image mask calculated mog2 algorithm can see mask not detected moving hand @ all, given background in video stationary (there maybe 1 or 2 white pixels @ time showing in mask). tried using different video, 1 many examples seemed use moving traffic. attempt @ traffic background subtraction

you can see picked on moving car -very- slightly. have tried (for both these videos) setting "learning threshold" apply method many values between 0 , 1 , there not variation @ results can see above.

have missed regards setting background subtraction or videos particularly hard examples deal with? can adjust settings of background subtraction favour setup (if anywhere)? repeat fact in both videos camera stationary.

try using mog subtractor instead of mog2 background subtractor.. might you.

because times mog subtractor handy. worst thing mog subtractor has been moved bgsegm package. it's contrib package. available in opencv git hub page itself.

https://github.com/itseez/opencv_contrib


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -