Solving system of linear equation for Geometric transformation of Rotation and Translation
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Mathematics and Optimization en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!