Ask Your Question

Revision history [back]

If you have a picture of your scene, without any object of interest, you could just do a simple thresholding (absdiff. The results will depend on your scene, and if there is illumination change (almost the case instead you are using a control light).

If you could take more than just an image, look at the background subtraction of OpenCV BackgroundSubtractor or VIBE. You could also look at the sample bgfg_segm.cpp and bgfg_gmg.cpp in OpenCV/samples/cpp.