I'm using the CodeBook Method that the OpenCV library has integrated in a project. Till now I've managed to make it work on my webcam but there seems to be some problems. The brightness auto-adjust of the camera messes up the whole end result since whole regions(sometimes the whole image) get tagged as foreground.
I really want to know if I can access the background model that the algorithm produces in order to make some basic shadow detection that will eliminate the brightness changes. As an end result I would like to have the foreground images classified as: a) foreign object b) region that only has the brightness changed.
PS: I'm using OpenCV 2.1 along with Dev C++ 4.9.9.2