Ask Your Question
0

How to fill gaps in letters

asked 2017-04-09 14:08:50 -0600

Habib gravatar image

updated 2017-04-10 08:02:42 -0600

Hi i'm new in openCv. i am using OpenCV to process image before sending it to tesseract. but there is gaps in some letters and numbers. How can I fix this?

Thank you.

UPDATE: my process result is this : www.imgh.us/1491762567343_1491762645019.jpg

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2017-04-10 03:23:58 -0600

It kind of depends on the gaps, can you produce some examples for us? But in general I would look at something like

  • Start by detecting all blobs with findContours.
  • Connect blobs that are close together (dilate and erode are useful here), keeping in mind that blobs split vertically should be merged, but horizontally should be left alone, because then you will connect neighboring letters.

Good luck!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-04-09 14:07:46 -0600

Seen: 526 times

Last updated: Apr 10 '17