Hello friends,
I have a hard time to ocr the above image due to the gaps that were made due to line removal.So could anyone kindly guide me on how to fill the gaps in chinese character using imagemagick
Hello friends,
I have a hard time to ocr the above image due to the gaps that were made due to line removal.So could anyone kindly guide me on how to fill the gaps in chinese character using imagemagick
2
Answers
If I understand this correctly then you want to find a way of removing the white lines and then still get it to go through an OCR?
The best way would be by eye and connect the dots so to speak so the last pixel of the characters line up.
A programitcal way would be to remove the white line ad then duplicate the line above (or below) and shift it into place.
I don’t read Chinese but this is what it got machine translated as
Cool question! There are many ways of approaching this but unfortunately I can’t tell which ones work! So I’ll give you some code and you can experiment by changing it around.
For the moment, I tried simply removing any lines that have white pixels in them, but you could look at the lines above and below, or do something else.
Here’s the image
DEBUG-white-lines.png
:The white lines are identified as:
The final command run is: