Ask Your Question

Revision history [back]

Sorting centroids

I have an image like this

image description

Now I have the centroid of the bounding box and I want to sort them in row-wise order as in images 3 and 5 are changed.

How to solve it

I have used euclidian distance and python OpenCV