# How to transform given XY coordinates using 'lwm' tform?

1 visualización (últimos 30 días)
Sudip Paudel el 6 de Jul. de 2020
Comentada: Sudip Paudel el 6 de Jul. de 2020
Hi, I have a set of XY coordinates, how do we transform given XY coordinates using 'lwm' tform?
ROI_Coordinates_XY=[1,2; 2,3; 4,5; 6,7; 1,0; 1,6]; %XY coordinates that need to be transformed
cpselect(img1, img2) %selecting control points
keyboard
img1_coordinates=movingPoints; clear movingPoints %save control points
img2_coordinates=fixedPoints;clear fixedPoints %save fixed points
tform_LWM = fitgeotrans(img1_coordinates, img2_coordinates, 'lwm', 10); %calculate tform using 'lwm'
%Tranform ROI_Coordinates_XY using the same tform_LWM.
tform_ed_XY = Help_function (tform_LWM, ROI_Coordinates_XY);
%I am looking for a function like transformPointsForward for tform_LWM.
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

Matt J el 6 de Jul. de 2020
Editada: Matt J el 6 de Jul. de 2020
A forward version of the lwm transform is not provided because it is not guaranteed to be a 1-1 transformation, but perhaps it would be useful to you simply to do the inverse fit
tform_inv = fitgeotrans(img2_coordinates, img1_coordinates, 'lwm', 10);
and then apply transformPointsInverse.
##### 1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
Sudip Paudel el 6 de Jul. de 2020
Thank you.

Iniciar sesión para comentar.

### 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!

Translated by