Removing Horizontal Lines From Scanned Image
Well tried morphology in Imagemagick, but unfortunately the output also affects the text, thus making it unsatisfactory for ocr. So is there any faster way to remove the lines from
Solution 1:
Your ImageMagick command is erroneous and should not even work. You need to make the kernel a horizontal line not vertical and you need a longer line for the kernel. Try the following:
magick 1sa.jpg -morphology bottomhat "20x1:0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0" -negate result.png
Adjust the kernel length as needed to optimize your result.
Post a Comment for "Removing Horizontal Lines From Scanned Image"