Page 2 of 2
Re: Removing caption background for use in ORC (tessearct)
Posted: 2017-03-09T11:20:05-07:00
by gilberto_san
fmw42 wrote: ↑2017-03-09T11:08:59-07:00
Try this Unix syntax:
Code: Select all
convert 9a6c443dfa76445fa95158948cc4e9bd.png \
\( -clone 0 -colorspace HCL -channel g -separate +channel -threshold 40% \) \
-alpha off -compose copy_opacity -composite result.png
Please always provide your IM version and platform, since syntax may differ.
I´m testing
tks
Re: Removing caption background for use in ORC (tessearct)
Posted: 2017-03-09T13:06:55-07:00
by gilberto_san
I used part of your command
Code: Select all
convert print1.bmp -colorspace HCL -channel g -separate +channel -threshold 10%% -negate print1.bmp
And got 3 figures. (print1-0.bmp print1-1.bmp print1-2.bmp)
Figure print1-1.bmp is perfect for my purpose.
Now 90% of my problem is solved. thank you so much.
Let's go to the remaining 10%.
I have images with the gray background and the font with shades of gray.
Serpá that I can remove the bottom?
Remembering that I can make multiple prints with the same text. And different backgrounds
Do you have any tips or suggestions for such a problem?
Thanks
Re: Removing caption background for use in ORC (tessearct)
Posted: 2017-03-09T14:16:47-07:00
by fmw42
I do not understand your question. Please post examples and explain further.
Re: Removing caption background for use in ORC (tessearct)
Posted: 2017-03-09T19:30:42-07:00
by gilberto_san
i use the command
Code: Select all
convert aaaa.bmp -colorspace HCL -channel g -separate +channel -threshold 10% img.bmp
And got 3 pictures : img-0.bmp | img-1.bmp |img-2.bmp.
Figure img-1.bmp is great for character recognition
If I use in a gray font the result is bad
Any suggestion to be able to extract the character when the font is gray?
Re: Removing caption background for use in ORC (tessearct)
Posted: 2017-03-09T20:30:29-07:00
by fmw42
Gray images have no saturation (since there is no color), so the same technique will not help. All you can do it threshold on intensity.
Code: Select all
convert image -threshold XX% result
Re: Removing caption background for use in ORC (tessearct)
Posted: 2017-03-09T20:31:48-07:00
by fmw42
If on Unix system, you could try some of my auto-thresholding techniques. See my home page in the table of categories down the page.