Borrar filtros
Borrar filtros

FitGeoTransform- moving point and fixed points not working into function

7 visualizaciones (últimos 30 días)
I have found the co-ordinates of both my FixedPoints and my Moving points.
The output for my Moving :
MovingPoints =
33.9008 380.1554
80.2401 26.5201
106.6683 452.9590
445.4878 391.7935
and my fixed:
FixedPoints =
26.5000 445.5000
26.5000 26.5000
26.5000 445.5000
445.5000 445.5000
however when I'm applying the function of fitgeotrans i get the error:
Error using fitgeotrans>findProjectiveTransform (line 187)
At least 4 non-collinear points needed to infer projective transform.
Error in fitgeotrans (line 100)
tform = findProjectiveTransform(movingPoints,fixedPoints);
Error in Reportprogress (line 74)
t = fitgeotrans(MovingPoints,FixedPoints,"projective")
I have no idea why it says ther are no 4 points when my FP and MP each have 4 co-ordinates...
Thank you for your time.

Respuestas (1)

Torsten
Torsten el 6 de Mzo. de 2022
The points are the rows of your matrices, and in the FixedPoints matrix,
(26.5000 445.5000) and (26.5000 445.5000)
as well as
(26.5000 26.5000) and (445.5000 445.5000)
are collinear.
  4 comentarios
Noah Noah
Noah Noah el 6 de Mzo. de 2022
No that didnt work. However my code for geting the FixedPoint and MovingPoint were used by the reshape.
When using the vec2mat instead, it has worked? :/
Is there any reason for this?
Reshape : FixedPoints = reshape(Centroid,[],2)
Vecmat : FixedPoints=vec2mat(Centroid,2)

Iniciar sesión para comentar.

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by