필터 지우기
필터 지우기

FitGeoTransform- moving point and fixed points not working into function

조회 수: 7 (최근 30일)
Noah Noah
Noah Noah 2022년 3월 6일
댓글: yanqi liu 2022년 3월 7일
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