How do I measure differences in distance between different pictures?

I have 20 pictures of a calibration slide, and I would like to measure if the calibration cross on this slide is in the same position on every picture. (X and Y coordinates) And if not, what the distance difference is. Is there anybody who can help me with this?


How would you detect automatically the center position of the cross?
I guess this is the central point of the question. Can you post an example image so that we can get some inspiration?

Hi Tinevez,

Thank you for your reply!
Yes indeed, detecting automatically the center position of the cross that is what I ideally would like to do.

This is one of the pictures.

Woa this looks like a special project, at least by my modest standards. There is little chance some can solve your problem here with a 2-liners.

Anyway, here is what I have tried.

  • I thought it is best to focus first on the circular black circle around the cross, because at least we can see it well.
  • I reasoned I could not use hough transform reliably, because the image of the circle is not a circle. It is not even an ellipse.
  • So I tried to segmented.

I went to background subtraction (Process > Subtract background with a radius of 100 pixels and light background) to stress it and discard the left part, which is dar as well.

Then I used a threshold (Image > Adjust > Threshold) and analyze particle (Analyze > Analyze particles).

It yields this:

Beyond that, I don’t know…
Now that I have the circle I have a much smaller region to inspect. Maybe something like pattern matching would work?

What have you tried?

1 Like

Hi @Guest1003

This is not to easy but I tried it using the ImageJ Integration in KNIME Image Processing and some model learning in KNIME.

This is my result:

You can download the workflow from here (1018.8 KB).

To open this workflow install KNIME + all free extensions and then use File > Import KNIME Workflow to open the workflow.

The model is learned with 8 different segments. If the images are similar to this one the model should work, else you have to learn another model with more labels.

This is just a starting point and probably needs some adjustments.


You may want to look at the Feature Finder plugin.
First create a square region of only your micrometer cross, then use it as protoype to be found in other images.