I am trying to extract several moving objects in a video frame, and extract them as foreground. The data is from video frames
.
The current problem is: the light is changing, so there are some shadows, or more brighter parts than the actual background. This leads to false background/foreground extraction by OpenCV MoG
background segmentation method.
For this, I haven't get any straightforward method, but have an idea like this: if I can extract the edges of those moving objects in the previous frame, then maybe I could track them using algorithms like SIFT
in the next frame, see where they are, and regard them as foreground.
I think in this case, the light change won't affect the result. If I am right on this point, then my question is:
How can I do the edge detection of those moving objects efficiently with OpenCV? If I need to use SIFT
algorithm in OpenCV, is it freely available? From the web, I saw it was nonfree, am I right?
And my second question is: does anyone have a better idea for this?
Thank you.