Page 1 of 1

Remove horizontal dashed lines

Posted: 2015-05-05T07:46:27-07:00
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 :)

Re: Remove horizontal dashed lines

Posted: 2015-05-10T19:31:03-07:00
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...