Shadow removing

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
wet
Posts: 1
Joined: 2016-04-11T22:17:03-07:00
Authentication code: 1151

Shadow removing

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Shadow removing

Post 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.
snibgo's IM pages: im.snibgo.com
Post Reply