All the programming is done in a PC-Platform. I use Visual C++ 6.0 with the FLTK libraries. The processing time is about 15 to 20 seconds running on a 450 MHz PC.
The following are the 2 views of my lab taken by a digital camera with resolution 1152 pixel x 864 pixel. The 4 red dots on each image are the corresponding points used to solve for the parameters on the next stage.
Warping and Mosaicing of the pictures:
After the registration, the parameters of the projective mapping are calculated by implementing the algorithm specified in the Prof Heckbert's paper Projective Mappings for Image Warping. I choose to warp the left image into into the projection of the right image. Then after knowing the parameters for the projective mapping, the four corners of the left image are transformed. This information together with the four corners of the right image, determine the size of the composite image. After finding the size of the new composite image, each pixel is then calculated by using a scanline method. For each pixel on the new composite image, first the corresponding coordinate on the left image is found by backward projection. Then bilinear interpolation is used to compute its pixel value on a sub-pixel resolution level. Secondly, the corresponding coordinate on the right image is found by a simple translation, and no interpolation is required to calculate its pixel value since this image is unwarped. Then the pixel obtained from the left image and the pixel obtained from the right image are weighted according to the distance to the center of the corresponding image. The weight is chosen to assume a value of 1 on the image center and a value of 0 on the edge and outside of the image. Then the new pixel value is the weighted sum of those two pixels. After repeating this process for each pixel, we obtain a new composite image as follows:
The saved picture can be loaded again and combine with another view: