Format of the prior initialization file


Let's walk through an example of the prior initialization file for the Boston image pair:

1 0
0 1
611.747 867.57 1377.69 916.268

1 1

1333.42 871.998    1421.96 960.538

First of all, this prior initialization file is an ASCII-based plain text file. Second, it is important the file only has UNIX line carriage, even when working in Windows environment. In Windows, one may use free utilities, such as "dos2unix", to convert Windows line carriage to UNIX.

The first line always contains an integer number. This number indicates how many initializations are available in the file. In the case of our example, it is "1". The rest of the file describes one initialization. If more are needed, simply concatenate one after another, separated with an empty line. Do not forget to change the integer in the first line accordingly.

Within the initialization, the top five lines (starting with "SIMILARITY") describe a transformation. The example is a similarity transformation, but other transformation models may be used. One may follow the format specified in transform.html to create a new one. Please note the transformation used by GDB-ICP is centered. If a conventional (uncentered) transformation is to be applied, one may set the center, [c1 c2]^T, to zero.

The next three lines (tagged with "SCALING_FACTORS") specify scaling factors on the x and y axes, introduced by the transformation. This field is not important. One may roughly approximate these values or even just set them to ones.

The last two lines (tagged with "REGION") specify a rectangular region within which the initial transformation is valid. Recall that GDB-ICP algorithm adaptively grows the region, beginning with the region specified here. The first two floating-point numbers specify the top-left coordinate of the rectangle, while the latter two specify the bottom-right coordinate of the rectangle.

Once the prior initialization file is assembled, one may run gdbicp executable with the command-line switch "-init_prior", followed by the file name.

The gdbicp executable usually checks only the top five initializations. If more are desired, apply the switch "-max_trials", followed by the integer number.

At the end, to test the above example, one can the following command, which shall produces the successful result:

gdbicp P5244293.JPG P5244294.JPG -init_prior test.init