I need a background subtraction application that returns a black / white image as an output with an exception representation of objects. Please see the image below for more information. It should be an online algorithm so that light changes like video changes in the background, but it should be able to detect long-lasting objects
I did it in codec with code jerk Tried, and the two main problems are: 1. This noise is 2. Although I set the parameters in BackgroundSubtractorMOG2 (30000, 16.0, false) high, the background adapts very fast.
I do not need any object tracking.
This should be a standard application of the background but I could not find an example code. How can this be implemented? Thanks a lot.
... for (;;) {cap> & Gt; Frame; Elderly women. Operator () (frame, front); Bg.getBackgroundImage (back); CV :: findContours (front, shape, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE); CV :: drawContours (frame, shape, -1, cv :: scalar (0,0,255), 2); Cv :: imshow ("frame", front); Cv :: imshow ("background", back); Break if (cv :: waitKey (30)> = 0); } ...
Comments
Post a Comment