Warning
This page is located in archive. Go to the latest version of this course pages. Go the latest version of this page.

Input Data Capture and Preprocessing

Scene capture

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.

Task 1-1

  1. Choose your scene for reconstruction. The scene should contain some significant 3D structure. E.g. a stone portal of a baroque house door or a church entrance is suitable.
  1. Capture digital images of the scene from multiple views. The views should cover the space evenly, we recommend that the major part of the portal is completely visible in all images. Submit your pictures to the upload system (as an archive, assignment 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).

Fig. 1: Capturing scene Fig. 2: Example input images

Internal Calibration of Camera (Radial Distortion and K)

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

Task 1-2

  1. Capture reference images of calibration chart. The chart is attached to the wall in front of the room E230. Three views should be captured: one orthogonal and two slightly slanted; see figure 3. Full field of view should be covered by a calibration chart. Whole calibration chart need not be visible, but the central part with dot-code should.
  2. Pack up reference images in full resolution and maximal quality as JPEG images into a single ZIP archive and submit the archive into teh upload system (assignment 12_rd_cal). System will estimate parameters of radial distortion.
  3. Calibration procedure can take few minutes.
  4. Visit the link “Result from AE” (“výsledky hodnocení”), download the rd_calib.mat file. This file contains the K variable, rd variable (structure with geometric transformation parameters) and the rd_eval variable, giving the accuracy of calibration.
  5. The tools for image un-distortion are in the code repository (archive rd_undistort).
  6. Verify your radial distortion parameters by un-distorting the calibration images. Straight lines in the scene should be straight in the image as well.
  7. Finally, un-distort all images of the scene an the images that will be used for internal camera calibration (the next section).

Important: the same focal length, must be used for capturing the calibration images and the scene.

Image un-distortion

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' );
courses/tdv/labs/1_input_data.txt · Last modified: 2018/10/02 12:40 by xmatousm