Page 1 of 1
photo of text to black & white
Posted: 2015-11-01T07:45:53-07:00
by miloman
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
Re: photo of text to black & white
Posted: 2015-11-01T10:55:29-07:00
by dlemstra
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.
Re: photo of text to black & white
Posted: 2015-11-01T11:50:23-07:00
by fmw42
My textcleaner seems to work. I get
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
Posted: 2015-11-02T09:04:30-07:00
by miloman
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!
Re: photo of text to black & white
Posted: 2015-11-02T10:54:28-07:00
by fmw42
My mistake, it only works for light text on dark background, so do two negates. So try
Code: Select all
convert -quiet Larry008.tif -negate -lat 25x25+10% -negate result.tif
If on unix, try my script
Re: photo of text to black & white
Posted: 2015-11-03T08:17:27-07:00
by miloman
Hi Fred,
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
Posted: 2015-11-11T08:30:21-07:00
by miloman
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
Re: photo of text to black & white
Posted: 2015-11-11T10:13:37-07:00
by fmw42
try lowering the 10%
Code: Select all
convert Larry059.jpg -negate -lat 80x80+5% -negate result.png
Re: photo of text to black & white
Posted: 2015-11-12T08:45:38-07:00
by miloman
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!