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.


