[AUTO]-STITCHING IMAGE MOSAICS

Computational Photography: Project 4

 

E. Begum Gulsoy

 

PART A: IMAGE WARPING and MOSAICING

 

The first part of the project involves image warping, mosaicing and compositing. The emphasis is on calculating correct homographies and blending panoramas in a mosaic. The corresponding points, which are used as the basis of homography calculations, are user-defined by clicking. Default number of corresponding points is 4, but it is modifiable. The default blending is weighted alpha blending. A laplacian blending option is also present. The programming was mainly done using IDL.

 

Three mosaicing examples are presented. The first two are taken at schenley park, Pittsburgh. The third is the dome of blue-mosque at Istanbul. No tripod was used in either of the pictures but the camera was stabilized on a flat surface for schenley park images. Apart from that, two image rectifying examples are presented. 

 

MOSAICS

 

Software: Microsoft Office

 

 

    

 

    

 

RECTIFIED IMAGES

 

Software: Microsoft Office    

 

    

 

BELLS N WHISTLES

 

     INTO    

 

     INTO    

 

LEAD Technologies Inc. V1.01     INTO    

 

     INTO     

 

 

PARTB: AUTO-STITCHING

 

The second part of the project involves auto-stitching through defining harris corners of the two images, using the method introduced in the paper given in class to perform feature matching and using ransac to pick 4 points among all the points of interest which gives the best homography matrix, and therefore theoretically the best homography between the two images. Using the alpha blending and mosaicing from part A, and the picked points with calculated homography matrix, a new mosaic is built automatically.

 

Harris Corners Detected are as follows:

 

 

The best 250 points are shown.

The red points show the corresponding points between two images.

The blue points correspond to the best match results among the red points using RANSAC.

 

 

Not to be solving an over-sampled system, the first 4 blue points detected are taken and the homography matrix is recalculated.

 

 

As can be seen the 4 points are indeed corresponding points in the two images. One idea is logically clouds would not be the perfect points to calculate correspondence since they are moving elements.

However, this factor is ignored and it is assumed that between the taking of the two pictures clouds remained constant.

 

Here is my result:

 

 

My auto-stitching code does not work properly. I think this has something to do with the pictures I used. The clouds, even though they exactly match, are moving things and that might be one reason why my homography is not correct. I also used the trees in schenley from partA and that didnÕt give me any better results. The partA code seemed to work properly and I am using the same function for homography matrix calculations. From the above results the points seem to be correctly chosen.I might be needing more detailed pictures which have more specific cornersÉ I am still trying to figure out what is going wrong but i am giving up for the time being J

 

After almost 5 more daysÉ

 

Here is the results for the modified auto-stitching code, which seem to work much better. The code was modified to calculate the homography depending not on the best matches but one step up in RANSAC. For some reason the homography calculated from best matches (which is usually around 4-7 points) is a poorer match.

 

 

Here is four images stitched together by the same way:

 

 

Here is another 2 pictures matched, also showing the points used for matching. This is one of my bosphorous/Istanbul pictures so the pictures were not taken with the intention to be used for this project and therefore have a much poorer match between them. The stitching is actually successful especially at the background (the bridge) and given the fact that these are just random pictures J

 

 

 

so here is moreÉ

 

the following pictures are cylindrically warped. First each of the 4 panorama images are warped into cylindrical and then they are combined into a complete panorama. No blending was performed. The match between pictures is not perfect but this is at least a more realistic representation of the panorama.

 

 

 

The result of stitching is:

 

 

 

and then there is the spherical warpingÉ For this a mosaic stitched into a panorama by auto-stitching was used. And it looks really cool!!

 

 

playing with the parameters of the program results in nice fun images:

 

 or taking this a step furtherÉ

 

 

and finally the panorama recognition. The basic idea was that given two images if the corresponding points were less than a certain number (4) the two images were considered to not to match. For mosaicing alpha blending was used, like above. Giving completely different images as an input to the program definetely helps ;)

 

so the images given as input were:

 

 

and the output was:

 

 

 

 

The focal lengths for spherical and cylindrical warping were all found on a trial and error basis. All of the programming has been done using Interactive Data Language (IDL).