How to automate distance measurement between multiple labeled points


I am a new user, hoping to use Fiji to analyse overhead drone footage of pods of beluga whales, but after going through the ImageJ user guide and doing some initial research on this forum I’m having trouble finding appropriate plugins or macros for my task.

Here is the general situation:
I have stacks of images representing 1 frame/sec for each pod encounter, and for each frame, I want to measure the distances between all animals. I would like to identify each animal with a labeled point (eg: A2 for the second adult in the frame, C1 for the first calf in the frame, etc., only numbers will not work for my purposes) and then automatically measure the distance between one point and all other points, for each point in the frame.

Because I have so many stacks to analyse and up to 700 images in each stack, I would ideally like to find a way to automate the detection and labeling of the animals after identification in the first frame, but at the moment this is a secondary concern, as the most time consuming task will be the repeated measurements I need to make, and I suspect that the rough nature of my footage (some significant sunglare, animals overlapping or moving in and out of the frame) may make this sort of automation impossible.

As I mentioned, I am a new user, so I apologize in advance if I am missing anything obvious or if my explanation is unclear… I would appreciate any input I can get from experienced users!


Hi @Jaclyn

Welcome to the forum!

Detection of your objects is a segmentation task. From the segmentation you can get to labels.

You can always map numbers to individual labels. 1 -> A1, 2 -> C1, …

Since you have a time-dimension you could look at TrackMate to keep the labels assigned.

If you need help with the segmentation you should post an image of your dataset, then others can help.

Thanks for your input @tibuch! Here are a few images from my data set…

I’d appreciate any help with segmentation… I’ve been trying to threshold my images, and I’m having trouble getting ImageJ to detect only the animals without any reflections and sunglare also being detected.