Page 1 of 1
Clean shadow around text
Posted: 2018-06-27T13:17:27-07:00
by dattatembare
I'm using IM:ImageMagick-7.0.7-Q16 on Windows
I have processed an image(
https://www.dropbox.com/s/eqm7wgd8bbeqb ... l.png?dl=0)
using
Code: Select all
convert original.png -brightness-contrast 5 -depth 8 -quality 100 -morphology Smooth Ring:1 result.png
I have a shadow around my text, I want to make it clear so that tesseract can return exact text.
Result image is like -
https://www.dropbox.com/s/0k10yfllltmf1 ... t.png?dl=0
I tried -sharpen 0x2.0 and -unsharp 25x25, but didn't work
Re: Clean shadow around text
Posted: 2018-06-27T13:24:12-07:00
by snibgo
Re: Clean shadow around text
Posted: 2018-06-27T13:33:20-07:00
by fmw42
You will need to post your images to some free hosting service and put the URLs here. This forum does not allow direct image upload/storage.
What is your Imagemagick version and platform?
Re: Clean shadow around text
Posted: 2018-06-27T13:48:12-07:00
by dattatembare
@snibgo Thanks! for notes
@fmw42 I have updated my original post
Re: Clean shadow around text
Posted: 2018-06-27T15:20:17-07:00
by fmw42
try
Code: Select all
magick original.png -threshold 50% result.png
Adjust the threshold as desired to potentially improve the result.
Re: Clean shadow around text
Posted: 2018-06-28T06:39:51-07:00
by dattatembare
After using
Code: Select all
convert original.png -threshold 50% result-4.png
Result is poor than my original script
https://www.dropbox.com/s/yuxg42kz595f4 ... 4.png?dl=0
Re: Clean shadow around text
Posted: 2018-06-28T10:03:19-07:00
by fmw42
My result is better than the link to your result in your original post at the top. Your latest link does not look like the result you originally posted.
I have no other suggestions to offer.
Re: Clean shadow around text
Posted: 2018-06-28T11:56:15-07:00
by dattatembare
I didn't get you what you mean.
I tried
Code: Select all
convert original.png -depth 8 -quality 100 -morphology Smooth Ring:1 -negate -lat 25x30+20% -negate result-6.png
and result is much better.
Result link
https://www.dropbox.com/s/ulg4u2zcravn8 ... 6.png?dl=0
Re: Clean shadow around text
Posted: 2018-06-28T12:41:23-07:00
by fmw42
My result was better than your original result that you posted at
https://www.dropbox.com/s/0k10yfllltmf1 ... t.png?dl=0. Perhaps you have found a better method than your original post and even my method. Or perhaps your original result was an incorrect post, since it looks much like the source image.