Ask Your Question

Revision history [back]

How to calculate the position of the camera from an image

I have four traingles placed on the corners of an A0 page. Using openCV I have been able to calibrate the camera, through that i have got the distortion and intrinsic files saved. I have been able to detect the triangles using cvblobs or could do it using contours. But what I have to do now is to find the position of the camera so that I could figure out the ideal position to recognize the triangles. I don't know how to do the calculation and to code it. If anyone could please provide the steps in how to carry out and possibly example codes in c++, it would be great.

Thank you in advance.