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

3 ビュー (過去 30 日間)
Nitin  Chauhan
Nitin Chauhan 2019 年 1 月 26 日
編集済み: madhan ravi 2019 年 1 月 26 日
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 件)

カテゴリ

Help Center および File ExchangeMathematics and Optimization についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by