Is there a clever way to remove shadow of object using imagemagick?
I'm using a simple motion detection technique: blur + difference between two frames.
But in bright dayligh there is a dark shadow on the ground so I can't cut it with threshold. How can I remove/ignore it?



As you can see there is a car. Color may vary.
And background isn't homogeneous enough (asphalt) to apply fuzz + floodfill to remove shadow.
It is especially hard if a car is bright-colored and almost matches background color, so shadow becomes most changed area.
Version: ImageMagick 6.9.3-7 Q16 x86_64 2016-04-09 http://www.imagemagick.org
PHP via shell_exec("convert -smth") on Ubuntu 14