My goal is calculating camera's world coordinates using flat marker.
I have calibrated the camera and studied all the internal parameters.
The marker is a square.
Look my illustration (unfortunately I can not post it here yet).
{Xc,Yc,Zc} - camera-basis coordinates
{Xw,Yx,Zw} - world coordinates
My task is calculating the camera's coordinates in {Xw,Yw,Zw}-basis.
I need to do this using just one photo.
Actually I need to do it for every photo from my collection.
I have learned projective geometry theory.
I also implemented homography calculation.
Using intrinsic camera matrix which I know after calibration I have solved the system of linear equations
and found extrinsic matrix. And it's inverse matrix.
The inverse matrix allowed me to find my camera's {Xw,Yw}-coordinates. The solution looks right. I have tryed several photos made from different angles.
But I can not calculate Zw.
Now I'm not shure that the problem has a solution. But augmented reality applications solve the similar problem. They calculates the marker vertexes' coordinates in {Xc,Yc,Zc}-basis. If I could do this I would be able to resolve my question too.
I tried to investigate the ARToolKit implementation, but I did not overcome it. I want to understand the substance, not to use any library or ready solution.