I'm using Python to find the centroid of each bright point in the following image, to calculate the average distance between neighbours. scipy.ndimage.find_objects and scipy.ndimage.center_of_mass seem promising, but I don't see how to put everything together. Where can I find some references? I've done the task "manually" with Tracker, but I'd like to automate the process. Thank you.
CodePudding user response:
We can probably solve it using scipy.ndimage.find_objects
, but I prefer using
average_distance_between_neighbors = 21.858534029025055