Ask Your Question

About segmenting characters for ocr. Contours I could detect is not in order.

asked 2017-03-24 01:00:39 -0500

codename47 gravatar image

I have a code that can detect contours in an image. My image consists of a string of characters. But contours being detected is not in the order of character. So I am not able to save it in the correct order.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-03-24 03:16:57 -0500

Contours are order in a hierarchy. The python tutorial on contour hierarchy discusses this in quite the detail.

Basically what you have to do is sort your contours based on for example the upper left corner position of the bounding box. You could then use the x and y value of that position to sort out your contours.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-03-24 01:00:39 -0500

Seen: 1,527 times

Last updated: Mar 24 '17