Transformation matrix (projective2d) change of origin at application

조회 수: 3 (최근 30일)
Katharina Heitger
Katharina Heitger 2021년 11월 29일
댓글: Matt J 2021년 12월 5일
I have a transformation matrix (as a projective2d object) created with fitgeotrans(), which should be used as an image correction, and a simulated image, which I want to use for validation of this transformation matrix.
The points used as input for fitgeotrans() are calculated before based on some measurements, which works fine.
I apply the transformation matrix via the imwarp() function onto the simulated image. But now it seems that the correction is applied with the origin at the wrong point.
How can I change that, if the points used as input for the fitgeotrans() are assumed to be correct? And I do not think that the transformation matrix changes if I change the input order of the points in fitgeotrans(). (As long as the fixedpoints and their corresponding movingpoints are at the same position.)
Edit (30.11.2021): After some additional research, I have the suspicion, that i should maybe ask the question differently: How can I apply the transformation matrix so that the origin on the matrix is in the center before and after correction?
Any help is appreciated.
  댓글 수: 1
Katharina Heitger
Katharina Heitger 2021년 11월 30일
I think what I will try, is to calculate the translation, where the origin is now vs where the origin should be. Then translate the input points of fitgeotrans() and then calculate the transformation matrix.

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2021년 11월 30일
편집: Matt J 2021년 11월 30일
You should use imwarp's OutputView option to specify a coordinate system for the output with the origin in the center.
  댓글 수: 8
Katharina Heitger
Katharina Heitger 2021년 12월 5일
I git quite far with this!
However, I still do not get the desired result. But this comment or question was too long, so I wrote a new question about it.
Matt J
Matt J 2021년 12월 5일
But this comment or question was too long
Why?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by