I have a n:2 Matrix with points(x,y) found from dots in a rectangular calibration pattern. I like to sort these points row by row. I have sorted these points with lexsort but the distortion from the camera is too big so that y-coordinates will be overlap.
imageloading...
blobs=imageprocessing....
coordinates=np.array([blob.centroid() for blob in blobs])
nd=np.lexsort((coordinates[:,0],coordinates[:,1]))
coordinates=coordinates[ind]
Is there a way to sort this with help of a delaunay pattern going a long the rows?
import matplotlib.tri as tri
x=coordinates[:,0] y=coordinates[:,1]
triang = tri.Triangulation(x, y)