How to sort an array of rectangles by position?
问题 I've just realized that if I perform OCR process only on the regions that contain text, it would be a lot faster. So what I did were detecting the text regions in the image and then perform OCR process on each one of them. This is the result of "detecting text regions" step using OpenCV (I used it to draw the rectangles on the image): The only problem remains is I couldn't arrange the text result in the order that they appear on the original image. In this case, it should be: circle oval