I have a list of shapes (list of points) e.g. rectangles which I want to group/cluster together.
This is what I have:
And this is what I want to achieve.
How to do it?
I already looked at some clustering techniques, e.g., kmeans but it seems there must be a better way.
Thanks!