Removing see through of opposit page on a scanned paper

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
poojakrishna
Posts: 7
Joined: 2011-10-12T04:06:17-07:00
Authentication code: 8675308

Removing see through of opposit page on a scanned paper

Post by poojakrishna »

Hi friends,

I want to remove the see through of opposite page on some scanned papers. I have tried the -sharpen, -noise, -threshold and -white-threshold commands to reduce the see through but that affects the readability of the page too.

Please help me find the correct command and option to remove the see through with out affecting the page's readability.

Thanks in advance for your help.

Regards,
Pooja.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Removing see through of opposit page on a scanned paper

Post by fmw42 »

can you post an example?

see -lat (local area threshold) or my unix/bash textcleaner script at the link below, which used -lat.
poojakrishna
Posts: 7
Joined: 2011-10-12T04:06:17-07:00
Authentication code: 8675308

Re: Removing see through of opposit page on a scanned paper

Post by poojakrishna »

Hi,

Thankyou so much for your help. I'm looking into your script. Can you please tell me how can I attach a sample picture on my machine to the post?

Regards,
Pooja.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Removing see through of opposit page on a scanned paper

Post by fmw42 »

poojakrishna wrote:Hi,

Thankyou so much for your help. I'm looking into your script. Can you please tell me how can I attach a sample picture on my machine to the post?

Regards,
Pooja.

You need to upload your image to some free image hosting service. There are many around. Search Google. Then put the link from where your image is hosted in your post here.
poojakrishna
Posts: 7
Joined: 2011-10-12T04:06:17-07:00
Authentication code: 8675308

Re: Removing see through of opposit page on a scanned paper

Post by poojakrishna »

Hi,

Thank you for your help. Sample image is: Image.

Regards,
Pooja.
poojakrishna
Posts: 7
Joined: 2011-10-12T04:06:17-07:00
Authentication code: 8675308

Re: Removing see through of opposit page on a scanned paper

Post by poojakrishna »

Hi,

Link to the image is: http://www.freeimagehosting.net/21339.

Regards,
Pooja.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Removing see through of opposit page on a scanned paper

Post by fmw42 »

Here is the result from one test of my textcleaner script. You can vary the parameters and see if you can make it better.


textcleaner -f 15 -o 10 21339.jpg 21339_f15_o10.png

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

Re: Removing see through of opposit page on a scanned paper

Post by fmw42 »

Here is the result using just -lat with the same arguments

convert 21339.jpg -colorspace gray -negate -lat 15x15+10% -negate 21339_lat15x15_10.png

Image
poojakrishna
Posts: 7
Joined: 2011-10-12T04:06:17-07:00
Authentication code: 8675308

Re: Removing see through of opposit page on a scanned paper

Post by poojakrishna »

Hi,

Thank you so much for sharing the IM command. I will test the same command with different parameter settings as you said and will post the parametres if I can create a better result.

Your script's out put looks better than the -lat command's output. I'm using a windows OS. I will try the commands given in your TEXTCLEANER page with diffeerent paramerts.

Regards,
Pooja.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Removing see through of opposit page on a scanned paper

Post by fmw42 »

poojakrishna wrote:Hi,

Thank you so much for sharing the IM command. I will test the same command with different parameter settings as you said and will post the parametres if I can create a better result.

Your script's out put looks better than the -lat command's output. I'm using a windows OS. I will try the commands given in your TEXTCLEANER page with diffeerent paramerts.

Regards,
Pooja.

My script is a unix/bash script and will not run on plain windows. It would require you compiling windows with cygwin to get a unix-like environment. But you can run the IM command -lat and play with that just fine in windows. Note that % needs to be escaped as %% in windows.

see
http://www.imagemagick.org/Usage/windows/
Last edited by fmw42 on 2011-10-13T09:32:26-07:00, edited 1 time in total.
poojakrishna
Posts: 7
Joined: 2011-10-12T04:06:17-07:00
Authentication code: 8675308

Re: Removing see through of opposit page on a scanned paper

Post by poojakrishna »

Thank you!!!
poojakrishna
Posts: 7
Joined: 2011-10-12T04:06:17-07:00
Authentication code: 8675308

Re: Removing see through of opposit page on a scanned paper

Post by poojakrishna »

Hi,

Thank you so much for your help and for providing link to your scripts. -white-threshold with value between 80% to 90% worked for me to remove the see through.

convert input.jpg -white-threshold 80% output.jpg.

Regards,
Pooja.
Post Reply