FitGeoTransform- moving point and fixed points not working into function

7 次查看(过去 30 天)
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.

回答(1 个)

Torsten
Torsten 2022-3-6
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 个评论
Noah Noah
Noah Noah 2022-3-6
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)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by