The following ZIP file contains the source code required to perform 3D projection from stereo images using the DLT approach. The required input is a series of 2D points imaged in 2 views and their corresponding mapping to world space in order to compute the projection matricies for each of the cameras. The simplest method of obtaining this input is through the use of a calibration object. The input points must be located on at least 2 independent planes. Once compiled the application takes 5 files as input (3 calibration files + 2 files containing corresponding points for projection) which are defined as follows:

[CalibA] First set of 2D calibration coordinates

[CalibB] Second set of 2D calibration coordinates

[WorldPts] The 3D world points corresponding to the calibration points in

[PtsA] 2D coordinates representing the image points in the first view plane to be projected to 3 dimensions

[PtsB] 2D coordinates representing the image points in the second view plane to be projected into 3 dimensions

There must be an equal number of points in [CalibA] [CalibB] and [WorldPts] with the ordering of points in each of the files such that the first point in [CalibA] corresponds to the first coordinate in [CalibB] with both coordinates representing the world space coordinate appearing first in the [WorldPts] file. [PtsA] and [PtsB] must also contain an equal number of 2D coordinates which represent points corresponding accross 2 images usually obtained via as stereo matching algorithm.

Once the application has been executed the file specified by [Output] will represent the 3D projection of the corresponding points specified in [PtsA] and [PtsB].

The source code for this project is written in C++ and requires installation of the OpenCV library. No project files are include however it is trivial to create a solution in the IDE of your choice.

Source files can be downloaded using the following link: 3DProjectionSRC.zip