Effacer les filtres
Effacer les filtres

FitGeoTransform- moving point and fixed points not working into function

7 vues (au cours des 30 derniers jours)
Noah Noah
Noah Noah le 6 Mar 2022
Commenté : yanqi liu le 7 Mar 2022
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.

Réponses (1)

Torsten
Torsten le 6 Mar 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 commentaires
Noah Noah
Noah Noah le 6 Mar 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)
yanqi liu
yanqi liu le 7 Mar 2022
what is Centroid output?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by