Ask Your Question
0

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

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

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
0

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

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

Question Tools

1 follower

Stats

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

Seen: 1,653 times

Last updated: Mar 24 '17