Using python and opencv most recent versions.
I have an image like this one:
When the red dots appear, their position always random, so I don't know where they will be next time, this is just as an example. However there are 2 facts:
- I will have the x, y coordinates of each dot
- There will always be at least 3 clustered dots and the rest spread out elsewhere.
I want to detect where the cluster is and draw a shape around them. The expected output should be like this:
Since I don't know where they will appear, if I use a red dot as a reference to measure distance, it is possible that one will be outside the cluster. If I try to determine if the dot is in the cluster measuring their x position, it is possible the next cluster will be further away and the spread out dots will be closer on the x side.
The dots don't really contain any information besides their location (x,y).
Any ideas on how to solve this would be appreciate it.