Page 1 of 1

Shadow removing

Posted: 2016-04-11T22:37:48-07:00
by wet
Hi.
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?

Image

Image

Image

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

Re: Shadow removing

Posted: 2016-04-12T12:35:47-07:00
by snibgo
What distinguishes a moving shadow from a moving dark object? In these very poor quality images, the answer is "nothing".

If the images were higher quality, the texture of the road would be visible. When a shadow moves over the road, it becomes darker, but the texture remains the same.