Background removal with changing light
I've got a project where I have a camera mounted on the ceiling pointing to a map on a table.
Before any pieces are placed on the map, I train a background subtractor to know what's background and what's not, and segment those pieces, so that I can get their shape & colors.
However, whenever the lighting changes (ie. you're playing inside next to a window and it starts getting darker) the whole thing falls apart.
This is the only way I've found to correctly identify moving parts within a "game board", but the lighting changes are basically throwing it in the wind.
Any ideas of what I can do to periodically adapt to the lighting conditions without having my pieces becoming part of the background? Any help would be appreciated.
You can look in the direction of adaptive background subtraction method. For example can see my implementation of the algorithm VIBE: https://github.com/BelBES/VIBE, this algorithm is quite fast and stable enough to minor noise.
Thank you, but it still suffers from the "Jurassic Park" problem. After a little while, the moving parts become a part of the background :-(