My OCR accuracy is about 85% now. I can increase it to 95%-100%. The result of the commands in the previous post is the image below.
https://www.dropbox.com/s/0hmp1rc170l1j ... t.png?dl=0
The desirable result is the following image.
https://www.dropbox.com/s/g73qffwq7bm83 ... e.jpg?dl=0
Thanks.
fill black color for an outline
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: fill black color for an outline
try this:
Code: Select all
convert out.png -bordercolor white -border 1 \
-fill red -draw "color 0,0 floodfill" \
\( -clone 0 -fill white +opaque black -negate \) \
\( -clone 0 -fill black +opaque white \) \
-delete 0 -compose plus -composite -negate \
result.png
Re: fill black color for an outline
Nope...doesn't work.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: fill black color for an outline
The code works for me in IM 6.9.2.3 Q16 Mac OSX (unix syntax below)
input:
If on Windows, see http://www.imagemagick.org/Usage/windows/ for syntax differences
P.S. IM 6.7.7.10 was not a good release. IM was undergoing significant color space changes. You should upgrade if you can. See viewtopic.php?f=4&t=21269
input:
Code: Select all
convert out.png -bordercolor white -border 1 \
-fill red -draw "color 0,0 floodfill" \
\( -clone 0 -fill white +opaque black -negate \) \
\( -clone 0 -fill black +opaque white \) \
-delete 0 -compose plus -composite -negate -shave 1x1 \
result.png
If on Windows, see http://www.imagemagick.org/Usage/windows/ for syntax differences
P.S. IM 6.7.7.10 was not a good release. IM was undergoing significant color space changes. You should upgrade if you can. See viewtopic.php?f=4&t=21269
Re: fill black color for an outline
I upgraded to ImageMagick 6.8.9-9 Q16 x86_64 on my Linux box. It works...thanks a bunch!!