Solving system of linear equation for Geometric transformation of Rotation and Translation
조회 수: 1 (최근 30일)
이전 댓글 표시
The problem primarily concerns detecting change in an translated and rotated image with two transformed (x,y) coordinate points shared. The problem is to be solved using system of linear equation. ( easier to solve using tform and fitgeotrans function ).
where
% theta = angle of rotation
% x = X_axis translation
% y = Y_axis translation
syms theta x y;
eqn1 = 125*cosd(theta) - 30*sind(theta) + x == 249;
eqn2 = 373*sind(theta) + 158*cosd(theta) + y == 329;
eqn3 = 373*cosd(theta) - 158*sind(theta) + x == 400;
% eqn4 = 125*sind(theta) + 30*cosd(theta)+ y == 94;
[soltheta,solx,soly] = solve(eqn1,eqn2,eqn3)
It does provides two solution for each variable and one of them is correct ( as visible from images );
not sure why it is returning two sets of values.
e.g soltheta returns 29.94 and -84.5441 , with first one correct.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!