I am using OpenCV 2.4.3 (the latest version) to detect foreground from video streams using built-in GMG algorithm. The result works fine, but I want to also remove the foregroun
I can't help you directly, but I can point you towards the work of Graham Finlayson who has done a lot of work into shadow removal from colour images. See for example: