Ask Your Question

Revision history [back]

I have spotted a good introduction at https://docs.opencv.org/2.4.13.2/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html From this description one can sort out what functions are available and which to use for which tasks. So far as I understand, solvePnP() finds the pose as rotation + translation, but first I must 1. Define my own (arbitrary) coordinate system and present (InputArray) objectPoints in this system. 2. present (InputArray) imagePoints provided by

vector<point2f> corners; //this will be filled by the detected corners

bool patternfound = findChessboardCorners(gray, patternsize, corners,...);

corners are used as imagePoints. They are 2D coordinates in image space. If the shape of the object is known, I can do full 3D reconstruction from just 1 image taken by just 1 calibrated camera. If it is unknown, binocular vision or exact camera location in case of the single camera is needed. Then, one can take at least 2 stereo pictures from opposite sides and calculate 3D coordinates of characteristic points.