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

6 ビュー (過去 30 日間)
Laura nicolas
Laura nicolas 2021 年 5 月 27 日
コメント済み: Laura nicolas 2021 年 6 月 2 日
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

採用された回答

Michael Werthmann
Michael Werthmann 2021 年 6 月 1 日
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 件のコメント
Laura nicolas
Laura nicolas 2021 年 6 月 2 日
Makes perfect sense and works like a charm. Thank you so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by