Search code examples
opencvimage-processingemgucvbackground-subtraction

How to detect a background change in image processing?


I'd like to be able to detect if a camera's line of sight has been changed, thus seeing a sudden change in the background. Surely there's a clever way to do this?

When it comes to tracking changes in a video stream, it seems most of the work is related to separating the background from the foreground so that objects moving around in the image(s) can be identified using background subtraction or the like.

I'm using EmguCV (OpenCV) as my tool of choice...in case there's any particular suggestions around available algorithms in this tool set. I've looked experimented with the background/foreground subtractors available in Emgu. They're not bad for detecting foreground changes, but I don't see how to use them to watch for this type of event. Surely I'm overlooking something obvious.

Thanks.


Solution

  • I have used BackGround subtraction method before and it worked really very well. So, just as a rough idea i can suggest you something.

    Ok, you want to check the change in the image so, we can assume that most of the time the scene will be constant. If the scene remain constant then your background image will be constant. But if there is any change in the scene then the background image will try to change.

    Strategy: You can try to calculate the correlation between the current BG frame and a previous BG frame (may be 5 frame before or something like that). If the Correlation value is high i.e. ~ 0.99999 then there is not change in the scene otherwise something has changed.

    Just an idea !!