![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/638590/image.png)
how to apply a 2D displacement field to set of 2d pixel coordinates
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Laura nicolas
el 27 de Mayo de 2021
Comentada: Laura nicolas
el 2 de Jun. de 2021
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
0 comentarios
Respuesta aceptada
Michael Werthmann
el 1 de Jun. de 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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/638590/image.png)
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
Más respuestas (0)
Ver también
Categorías
Más información sobre Geometric Transformation and Image Registration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!