OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Wed, 14 May 2014 07:16:44 -0500Inverse Perspective Mapping with Known Rotation and Translationhttp://answers.opencv.org/question/33267/inverse-perspective-mapping-with-known-rotation-and-translation/Hi,
I need to obtain a new view of an image from a desired point of view (a general case of bird's eye view).
Imagine we change the camera's position with a **known rotation and transformation**. what would be the new image of the same scene?
We may put it in another way: how can we compute **homography matrix** by having the rotation and translation matrices?
I really appreciate any help!Tue, 13 May 2014 11:25:31 -0500http://answers.opencv.org/question/33267/inverse-perspective-mapping-with-known-rotation-and-translation/Answer by kbarni for <p>Hi,</p>
<p>I need to obtain a new view of an image from a desired point of view (a general case of bird's eye view).
Imagine we change the camera's position with a <strong>known rotation and transformation</strong>. what would be the new image of the same scene?</p>
<p>We may put it in another way: how can we compute <strong>homography matrix</strong> by having the rotation and translation matrices?</p>
<p>I really appreciate any help!</p>
http://answers.opencv.org/question/33267/inverse-perspective-mapping-with-known-rotation-and-translation/?answer=33331#post-id-33331The homography matrix can be computed directly from translation and rotation:
It has the following form for a 2D case:
| cosA sinA tX |
|-sinA cosA tY |
| 0 0 1 |
where A is the angle of rotation, tX and tY is the translation of the image.
If you want 3D projection, you need to add one more dimension to the matrix, but it still can be calculated directly from the translations and rotations.Wed, 14 May 2014 07:16:44 -0500http://answers.opencv.org/question/33267/inverse-perspective-mapping-with-known-rotation-and-translation/?answer=33331#post-id-33331