Making Photographed Pages appear white

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
Posts: 11
Joined: 2009-11-30T02:06:33-07:00
Authentication code: 8675309

Making Photographed Pages appear white

Post by rshea »

I have a lot of JPG images created by photographing sheet music on a point and shoot camera.

I've managed to clean them up quite a bit by converting them to PNG8, making them greyscale and doing a -contrast-stretch . The musical notes etc are now looking OK but the paper remains a bit 'grey' looking.

I noticed in ... /index.php that the author "Composites the mask with the corrected image to make the background white". Unfortunately because I'm on Windows I can't use that script directly. Would anyone be able to explain how I could do my own version of that approach please (I don't want the whole of the textcleaner script - just the bit which picks up the text and plonks it on a white background).

While I'm here I'll ask something else. The images have quite a noticeable range of illumination across the page (presumably the result of a desk light etc nearby when no flash was used and the result of the on-camera flash at other times). Is there any way I could 'flatten' the illumination across the page without disturbing the text ?



User avatar
Posts: 26108
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Making Photographed Pages appear white

Post by fmw42 »

The key to my textcleaner is using -lat with a size just larger than the text and about 10% or 20% offset. See -lat ... ns.php#lat

Post Reply