Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

How to sort contours left to right, while going top to bottom using Python

$
0
0
I'm finding the contours for an image with digits and characters, for OCR. So, I need the contours to be sorted left to right, while going line to line, i.e. top to bottom. Right now, the contours aren't sorted that way. ![image description](/upfiles/1469801472555407.png) For example, the contours for the above image is sorted as 1,4,0,9,5,8,3,2,6,4,1,9,8,7,5,3,2,6 What I need is the sorting as 1,2,3,4,5,6,7,8,9,2,4,3,6,1,8,5,9,0

Viewing all articles
Browse latest Browse all 19555

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>