Remove horizontal dashed lines

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
edigomes
Posts: 2
Joined: 2015-05-05T06:58:53-07:00
Authentication code: 6789

Remove horizontal dashed lines

Post by edigomes »

How to remove these dashed lines from image, for Tesseract OCR recongnition?

Image

I try -morphology, but i'm very newbie in this command of imagemagick :? , am trying solve this for three days... someone can help me?

Sorry if english is not right :)
edigomes
Posts: 2
Joined: 2015-05-05T06:58:53-07:00
Authentication code: 6789

Re: Remove horizontal dashed lines

Post by edigomes »

Hello guys, i removed the lines using the following script:

Code: Select all

convert img1.jpg -write MPR:source -morphology close "2x15: \
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
0,1,1,1,1,1,1,1,1,1,1,1,1,1,0" \
-morphology erode square MPR:source -compose Lighten -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-morphology erode square MPR:source -composite \
-sigmoidal-contrast 50,80% \
img2.jpg;
But, lines together to the text don't are removed:
Image

it seems is a hard problem, none answer until now...
Post Reply