Clear Filters
Clear Filters

FitGeoTransform- moving point and fixed points not working into function

7 views (last 30 days)
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.

Answers (1)

Torsten
Torsten on 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 Comments
Noah Noah
Noah Noah on 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)

Sign in to comment.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!