Dear everybody!
I took photo of my fav personal book so i can carry around in my ipad. I tried using monochrome but the blackground is not pure white. I tried -lat which improve the text but left the background a dirty mess. I used -level which gave me a almost good result but some text are almost washed out. I have 100+ image to process. I found textcleaner but its script is not for windows.
Any kind souls, do you have some guidance for me and help me out? Much thanks in advance!
Sample of a my photo text here
https://www.dropbox.com/s/x0czuvss9w7f4 ... 8.tif?dl=0
photo of text to black & white
Re: photo of text to black & white
If you have programming experience you might want to give the C# version of the textcleaner script a try. You can find a link to the NuGet package here: https://github.com/dlemstra/FredsImageMagickScripts.NET.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: photo of text to black & white
My textcleaner seems to work. I get
or try
convert Larry008.tif -lat 25x25+10% result.tif
try adjusting the 25 to smaller values and see if you get any better results depending upon the size of the text and value.
Code: Select all
textcleaner -f 25 -o 10 Larry008.tif Larry008_textclean.tif
or try
convert Larry008.tif -lat 25x25+10% result.tif
try adjusting the 25 to smaller values and see if you get any better results depending upon the size of the text and value.
Re: photo of text to black & white
Hi fmw42,
I tried "convert Larry008.tif -lat 25x25+10% result.tif" but got a black image as a result (https://www.dropbox.com/s/w077l7pwyr13h ... t.tif?dl=0)
I am using
Version: ImageMagick 6.9.2-4 Q16 x64 2015-10-10
Since it is working at your machine, what could i be missing at my machine?
Much thanks in advance!
I tried "convert Larry008.tif -lat 25x25+10% result.tif" but got a black image as a result (https://www.dropbox.com/s/w077l7pwyr13h ... t.tif?dl=0)
I am using
Version: ImageMagick 6.9.2-4 Q16 x64 2015-10-10
Since it is working at your machine, what could i be missing at my machine?
Much thanks in advance!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: photo of text to black & white
My mistake, it only works for light text on dark background, so do two negates. So try
If on unix, try my script
Code: Select all
convert -quiet Larry008.tif -negate -lat 25x25+10% -negate result.tif
Re: photo of text to black & white
Hi Fred,
Thanks for the last cmd! Its works! Yes, I will use your script once I get my solaris VM up and running.
Thanks for the last cmd! Its works! Yes, I will use your script once I get my solaris VM up and running.
Re: photo of text to black & white
Hi Fred,
Hope u r doing great! Seek your expertise to solve two pages with charts. I tried 80x80+10%, it works for some chart but not for these two. i think cos of the fine lines in the upper right boxes. Your kind guidance much appreciate, pls! Much thanks in advance!
https://www.dropbox.com/s/qdk0urwuhqqkz ... 8.jpg?dl=0
https://www.dropbox.com/s/vwdu8ldv4nn11 ... 9.jpg?dl=0
Hope u r doing great! Seek your expertise to solve two pages with charts. I tried 80x80+10%, it works for some chart but not for these two. i think cos of the fine lines in the upper right boxes. Your kind guidance much appreciate, pls! Much thanks in advance!
https://www.dropbox.com/s/qdk0urwuhqqkz ... 8.jpg?dl=0
https://www.dropbox.com/s/vwdu8ldv4nn11 ... 9.jpg?dl=0
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: photo of text to black & white
try lowering the 10%
Code: Select all
convert Larry059.jpg -negate -lat 80x80+5% -negate result.png
Re: photo of text to black & white
Aha! Thanks Fred! I finally understand how the +10% and +5% works after seeing the result and googling bit more on the parameter. Thanks man! I am getting the results after following your latest guidance. Thanks again!