how to apply a 2D displacement field to set of 2d pixel coordinates

8 vues (au cours des 30 derniers jours)
I am working with image registration. I have registered all my images and gotten various tforms and displacement fields from the image registration pipeline.
I now want to evaluate my method, I have a set of point coordinates representing landmarks for each image. I have managed to apply all the tforms to these landmarks without issues. However, I have not been able to find how to apply a (image) Displacement field to a point coordinate. Is it even possible?
Example of data:
Registered images of 10000 x 13000 pixels (double)
tforms: T =[a,b,c;e,f,g;h,i,j] Dimensionality=2
Displacement fields: 10000 x 13000 x 2 (double)
Landmarks: 61 x 2 (double)
Thank you

Réponse acceptée

Michael Werthmann
Michael Werthmann le 1 Juin 2021
Hi Laura,
I suppose you want to calculate the TargetRegistrationError. Here is a formula for the 3d case. u is your deformation field whereas x_i and x_j are the respective coordinates of landmark pairs.
e.g. if one Landmark is at position (x = 5, y = 5).
You now need to get the values from the displacement field at this position and apply it.
new_pos_x = x_LM + u_x(5,5)
new_pos_y = y_LM + u_y(5,5)
If your Landmarks are between pixels, you have to interpolate the displacement field at this respective position.
Keep in mind the difference between pixelspace and real world coordinates if this applies to your case.
Regards
Michael
  1 commentaire
Laura nicolas
Laura nicolas le 2 Juin 2021
Makes perfect sense and works like a charm. Thank you so much!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Geometric Transformation and Image Registration dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by