Page 1 of 1

how to enhance the text in this image

Posted: 2019-06-28T14:11:38-07:00
by aspenlin
I have an image here:
https://www.dropbox.com/s/yis42coyq00nx ... 8.jpg?dl=0

In order to get a good result from OCR I need to increase the contrast of this image to make the text in it stand out from the background.
I tried 'convert -brightness-contrast 0x50 bloodtest8.jpg bloodtest8_bright_contrast.jpg' but the result is not satisfying to me. Some of the text is more clear now but not all of them. Especially for those text in the corners. The result is in the link below.

https://www.dropbox.com/s/v3z7ws0uyijau ... t.jpg?dl=0

Is there a way to achieve what I want? Thanks for your help.

Re: how to enhance the text in this image

Posted: 2019-06-28T15:59:31-07:00
by fmw42
try -lat

Code: Select all

convert bloodtest8.jpg -colorspace gray -contrast-stretch 1x0% -negate -lat 10x10+10% -negate result.png
If on IM 7, use magick rather than convert.

Please always provide your IM version and platform when asking questions, since syntax may vary.