Search
The goal of the work during the whole term is to reconstruct a 3D object (scene) from its images. In order to make the task manageable, we have chosen such a scene, that is relatively uncomplicated considering 3D computer vision methods: a decorative portal. The simplicity of such a scene lies in the fact, that the scene is almost planar and small number of views is enough for reconstruction.
11_data
Take pictures on at least three levels of height, four pictures in each. Distances between the levels should be as large as possible, but try to avoid forward and backward motion. Log a simple protocol about the capturing, with the sketch of the situation: location of cameras, distances between them an to the scene. This will be later useful for identification of individual views. Example of recommended capturing scheme is in figure 1.
Important: capturing must be done for a single focal length (zoom setting), the same that will be used for radial un-distortion and internal calibration. We recommend to use the shortest focal length of a camera (widest field of view).
Since the 3D reconstruction algorithms use the (linear) perspective camera model, it is necessary to remove radial distortion of input images. The correction is a kind of geometric image transformation, we need to determine its actual parameters, i.e., to calibrate it. All tools necessary for calibration and removal of radial distortion are at your disposal.
Fig. 3: Example of calibration images
12_rd_cal
rd_calib.mat
K
rd
rd_eval
rd_undistort
Important: the same focal length, must be used for capturing the calibration images and the scene.
Below is an example of un-distorting of all images in a directory. Filenames and paths must be adjusted to your situation of course. The output directory must not exist.
addpath /path/to/rd_undistort load rd_calib.mat % variable rd rddirundistort( rd, 'images_dir', 'undistorted_dir' );