Sorry if this question might sound like another I'm too lazy to google one, but I couldn't find what I'm looking for.
This question is for avoiding to reinvent the wheel. I think that what I'm looking for might exist, so I dont want to start out implementing it on my own:
I want to turn a heat map into a list of discrete points. I'm sure that an algorithm can be used which first thresholds the heatmap and then, for every "island" which was created by the thresholding, finds the gravitational center. This center would be a point. I want to get the list of these points:
Step 0:
Step 1:
Step 2:
I wonder if such an algorithm already exists, or if there is a better approach to this than my idea. Moreover, it would be perfect if there is a ready to use implementation, of course. E.g. computer vision libraries like OpenCV have the thresholding included. I just couldn't find the next step.
My target platform is iOS, so for implementations, Objective-C, C or C++ is preferred.