How to group points using treshold? [closed]
I have points list , from rectangle detector
points_list = [(1853, 1054), (1900, 1068), (75, 68), (74, 157), (10,500), (1700, 10), (1750,15) ]
threshold = 300 # X or Y distance between points How to group point using threshold? I need result:
[[(1853, 1054), (1900, 1068)], [(75, 68), (74, 157)], [(10,500)], [(1700, 10), (1750,12)]]
I tried cv2.groupRectangles, but I need group points.
in c++ there is already an answer
kmeans().. (that is: IF you know, how many clusters to expect)
@LBerger, @berak Thanks a lot!!