Methods for deciding if there is an object on the surface or not

asked 2019-10-01 05:30:04 -0600

I have a fixed camera which captures images of a certain surface. I have a base picture of an empty surface, which is not interesting to me. The only images I'm interested in is when other objects are placed underneath.

What are some ways I could figure out if there is a "difference" between the base image (empty surface) and camera-captured frames? I was thinking about detecting of pixel-wise "similarity", but the image of empty surface could change a bit based on the illumination, weather outside, shadows, etc... I'm an OpenCV newb, so any kind of help would be greatly appreciated. Thanks in advance.

P.S. The process should be as fast as possible, so more lightweight methods are preferred, even if they are somewhat imprecise.

edit retag flag offensive close merge delete

Comments

1

Look into background modeling. There has been a lot of work on this subject.

A "quick and dirty" approach would be to do an image difference between your background image and your candidate image, and then apply a threshold to the image, and then count the number of "on" pixels after the threshold. If more than 10% (for example) of the pixels pass the threshold, then you might have an object in the image.

The devil is in the details, of course...How do you update your baseline (backgorund) image, as it will likely change over time. How do you prevent image noise from polluting your measurement. How do you pick your threshold value?

swebb_denver gravatar imageswebb_denver ( 2019-10-01 15:08:00 -0600 )edit