
SOLVED**Removing shadow
SOLVED**Removing shadow
I have a number of photos of people's drawings that have been taken by a research assistant. Unfortunately, this massive set of photos was taken in poor lighting, so there is some shadow. I am looking for a way to get rid of the shadow on all the photos. I have tried sharpening, using a mask, using fuzz, etc, but I am beginning to think there is no way to do it. Here is an example photo for reference, and the ideal (though admittedly improbable) result would be a plain white background with the line drawing as foreground. Any help would be appreciated.


Last edited by jeff on 2014-04-02T14:19:38-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Removing shadow
try this (increase the blur from 5, if needed)
Unix syntax:
Windows syntax:
In the future, please identify your IM version and platform.
See
http://www.imagemagick.org/Usage/compose/#divide
Unix syntax:
Code: Select all
convert 255q24i.jpg \( -clone 0 -blur 0x5 \) +swap -compose divide -composite result.png
Code: Select all
convert 255q24i.jpg ( -clone 0 -blur 0x5 ) +swap -compose divide -composite result.png
See
http://www.imagemagick.org/Usage/compose/#divide
Re: Removing shadow
Thanks so much, that worked perfectly fmw42. Sorry about the lack of info on my version and platform
Re: Removing shadow
I have on followup concern, but before I get to that,
I am on Windows 7 Professional 64 bit,
using ImageMagick-6.8.8-10-Q16-x64-dll
So, I would like to be able to do this same transformation for all the files in a given directory.
Unfortunately, 'mogrify' is apparently not compatible with -clone or -compose, and any time I attempt to use 'find', it says that it is not recognized as an internal or external command. Does anyone have any solutions?
Thanks,
Jeff
I am on Windows 7 Professional 64 bit,
using ImageMagick-6.8.8-10-Q16-x64-dll
So, I would like to be able to do this same transformation for all the files in a given directory.
Unfortunately, 'mogrify' is apparently not compatible with -clone or -compose, and any time I attempt to use 'find', it says that it is not recognized as an internal or external command. Does anyone have any solutions?
Thanks,
Jeff
Re: Removing shadow
Nevermind, solved it.
Thanks anyways
Thanks anyways
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Removing shadow
What was your solution?jeff wrote:Nevermind, solved it.
Thanks anyways
Re: SOLVED**Removing shadow
Code: Select all
for %a in (*.jpg) do convert %a ( -clone 0 -blur 0x5 ) +swap -compose divide -composite -sharpen 0x5 %a