Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

perspective transformation with given camera pose

Hi everyone!

I'm trying to create a program, that I will use to perform some tests.

In this program an 2D image is being displayed in 3D space in the cv:viz window, so user can change camera (viewer) position and orientation.

image description

After that, program stores camera pose and takes the snaphot of the current view (without coordinates axes):

image description

An here is the goal:

I have the snaphot (perspective view of undetermined plane or part of the plane), camera pose (especially its orientation) and camera parameters. Using these given values I would like to perform perspective transformation to compute an ortographic view of this given image (or its visible part).

I can get the camera object and compute its projection matrix:


and then decompose projection matrix:

decomposeProjectionMatrix(subProjMatrix,cameraMatrix, rotMatrix, transVect, rotMatX, rotMatY, rotMatZ);

And what should I do next? Notice, that I can't use chessboard cornersbecause the image is undetermined (it may be any image) and I can't use the corner points of the image, because user can zoom and translate the camera, so there is posibility, that no image corner point will be visible...

Thanks for any help in advance!