Solving system of linear equation for Geometric transformation of Rotation and Translation

1 Ansicht (letzte 30 Tage)
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.

Antworten (0)

Kategorien

Mehr zu Mathematics and Optimization finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by