0

I have an image with 2D projection(green one) of a 3D quad(blue one), like a photo of a room where original quad in 3D space is that room's floor. I know 2D XY position of ABCD points(provided by user).

Knowing width, height and inner angles of the quad in 3D space I want to get it's original camera-object interposition which created this projection. So, as far as I understand, this is exact problem solved by AR toolkits when displaying 3D markers over 2D images and can be solved with coplanar POSIT algorithm. I am using code from AForge.NET Framework ( http://www.aforgenet.com/articles/posit/ ) which gives me rotation matrix and translation vector as a result.

My first confusion: Am I getting rotation matrix and translation vector in a world coordinate system with (0,0,0) as the origin(i.e. my camera is at 0,0,0 position with 0,0,0 rotation)?

My second confusion: I place a quad with same size as original one(blue one on first image) on a XY plane, how can I transform my rotation matrix and translation vector generated by CoPOSIT algorigh in order to get camera position and rotation, so that this quad on screen mathes original 2D projection(green rectangle on first image). Like on the last image where blue semi-transparent 3D quad mathes the floor.

1 Answer 1

1
  1. From the research paper, page 3 (copy/paste is not working properly, IDK why):

    Our goal is to compute the rotation matrix and translation vector of the object The rotation matrix R for the object is the matrix whose rows are the coordinates of the unit vectors i j k of the camera coordinate system expressed in the object coordinate system Mu Mv
    Mw Indeed the purpose of the rotation matrix is to transform the object coordinates of vectors such as MMi into coordinates dened in the camera system the dot product MMi i b etween the rst row of the matrix and the vector MMi correctly provides the projection of this vector on the unit vector i of the camera coordinate system ie the coordinate Xi X of MMi as long as the coordinates of MMi and of the row vector i are expressed in the same coordinate system here the coordinate system of the object

    It seems like the camera is centered at (0, 0, 0) and is looking along the y axis.

  2. Correct me if I'm wrong, but you'd want to apply the inverse operations to the camera (shift the camera by -translation vector and rotate it by inverse of rotation vector).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.