Need to generate tform matrix from triangle parameters.

4 ビュー (過去 30 日間)
Marshall
Marshall 2016 年 1 月 19 日
コメント済み: Marshall 2016 年 1 月 29 日
If a user draws a triangle with parameters b, h and theta and wants to change an entire image via a transformation from a new triangle with user inputed parameters b', h', theta'. How can the transformation matrix be found?

採用された回答

Matt J
Matt J 2016 年 1 月 20 日
編集済み: Matt J 2016 年 1 月 20 日
The corners of each triangle are separated by vectors dy and dx. There is some 2x2 matrix A which transforms them from triangle 1 to triangle 2,
dy2=A*dy1
dx2=A*dx1
These are linear equations in the unknown A, which you can solve.
  5 件のコメント
Matt J
Matt J 2016 年 1 月 21 日
編集済み: Matt J 2016 年 1 月 22 日
would it be possible to use your absor function for this vary problem?
Only if theta doesn't transform. Otherwise, the transformation is not a pure rotation.
Marshall
Marshall 2016 年 1 月 29 日
Matt J I have since managed to solve for the matrix A how can then use this matrix to generate a matrix for an image?

サインインしてコメントする。

その他の回答 (1 件)

Matt J
Matt J 2016 年 1 月 20 日
Why not use fitgeotrans, like you were advised here?
  1 件のコメント
Marshall
Marshall 2016 年 1 月 20 日
I don't have the version of matlabwith fitgeotrans. I need to find someway without using two images.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by