Automatic count footprint

Hello everyone, I am new imageJ user. I need to use imageJ to measure the distance between the center of the footprint. I know i can use imageJ to measure each footprint manually, but it is so time-consuming. I want a macro that can measure the distance between two desired points. I have tried to make a marco from imageJ. However, it cannot define my two points (X-axis, Y-axis) by making a line. I’d be super thankful if anyone could give me some program for me or to suggest to me how to do it.

First, i need to measure the distance between point 1 (p1) and point 2 (p2).
And, measure the distance between p1 and p3.
Finally, measure the polygon area of p1, p2, p3, and p4.

Best regards.