Code & Data

Template code

We provide a template code for Level 1 and Level 2, which includes a simplest template matching method with the C++ standard template library and the OpenCV. Participants of Level 1 and Level 2 MUST use the code and can modify ONLY user_function() in user_function.cpp to implement your original ideas. Please download the code from the following links.

Note: The sample codes for level 2 outputs the estimated projection matrix at the last frame. Its format is as follows:

projection matrix

On the other hand, any sample codes for Level 3 are not provided. Participants of Level 3 not only can revise all the sample code for Level 1 and Level 2, but also they can implement from a scratch.

The above codes do not include any part for loading intrinsic parameters. Here is an example for how to load an OpenCV format file, intrinsics.xml.

Mat intrinsic;   // intrinsic parameters
Mat distortion;  // lens distortion coefficients

FileStorage cvfs("intrinsics.xml", CV_STORAGE_READ);
if( cvfs.isOpened() ){
   cvfs["mat_intrinsicMat"] >> intrinsic;
   cvfs["mat_distortionMat"] >> distortion;
}

Sample data

For each scenario, zipped PNG images, and zipped patch data are provided. For Level 3, intrinsic camera parameters are provided for mapping.

Scenario 1

The target scene of this scenario is a block house, made by LEGO bricks ‘Mountain Hut (31025)’, placed on the flat surface. All images are generated by the POV-Ray. The 3D world coordinate system has the positive x-axis pointing to the right, the positive y-axis pointing down, and the positive z-axis pointing into the screen. The origin of the 3D world coordinates is the left front corner of the base plate (see the right figure).

3DCoordinates of Scenario 1

Level 1

S01L01_VGA_0000

Level 2

Level 3

Scenario 2

The scene of this scenario is the same block house, but real one. All images are taken by a real camera (Point Gray Research, Flea3). The 3D world coordinate system and its origin are also the same as Scenario 1.

Level 1

S01L01_VGA_0000

Level 2

Level 3

Scenario 3

The target scene of this scenario is a block world, made by LEGO bricks, placed on the flat surface. This world is an extension of the LEGO house used in the Scenario 1. All images are generated by the POV-Ray. The origin of the 3D world coordinate system is same as the Scenario 1.

Level 1

S01L01_VGA_0000

Level 2

Level 3

Acknowledgement

We thank Takashi Kamiyama, Computer Vision and Image Media Laboratory, University of Tsukuba for preparing the template code. We also thank Shohei Mori, Reality Media Laboratory, Ritsumeikan University for preparing the image data of the scenario 2.