3D reconstruction

There is a tutorial named Camera calibration with square chessboard in section Camera calibration and 3D reconstruction (calib3d module) which indeed explains how to use a calibrated camera for 3D reconstruction. Is there a ready sample corresponding to this tutorial. Where can I find it?

edit retag close merge delete

can you point us to the tutorial you mean ?

( 2017-10-16 08:28:07 -0500 )edit
( 2017-10-16 09:56:08 -0500 )edit

this is actually about pose reconstruction using solvePnP, not about reconstructing a 3d model.

(and sadly, no sample code, apart from the (sloppy) tutorial)

( 2017-10-16 10:00:16 -0500 )edit
1

for 3d reconstruction, you'd either need

• a calibrated stereo rig,
• depth images, or
• multiple images(structure from motion)

main problem now is: what are you trying to achieve, exactly ?

( 2017-10-16 10:08:28 -0500 )edit

What do you mean by pose reconstruction? Determining the space orientation of the known object? In this case, the full-scale reconstruction may be broken into 2 sub-tasks: object recognition and its pose reconstruction. I would prefer using a single camera which can move around an object and take pictures from different positions. For the beginning, the object may be simple. Let it be a cube.

( 2017-10-16 10:53:36 -0500 )edit

"Determining the space orientation of the known object? " -- yes, exactly, that's another word for it.

( 2017-10-16 11:04:43 -0500 )edit

Sort by ยป oldest newest most voted

I have spotted a good introduction at https://docs.opencv.org/2.4.13.2/modu... 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.

more