Image warping and mosaicing

Roma Desai | CS -194 Project 5

 

PART A

 

OVERVIEW

 

For this project, I shot a couple individual photographs and warped them together using homographic projections to create an image panorama. This technique allows us to take separate photos but create a combined image that shows a much larger field of view.

 

 

PART 1: SHOOT THE PICTURES

 

The first step was to shoot some pictures. To ensure the transformation between each photograph was perspective, I shot from the same point of origin but rotated the camera to capture different angles. I also had to ensure my photographs were taken with the same aperture and exposure settings. I made sure the images overlapped by about 50% so I could later identify common key points between the images. Here are a few I took around my house:

 

A living room filled with furniture and a large window

Description automatically generated

A living room filled with furniture and a rug

Description automatically generated

A close up of a decorated tree in a room

Description automatically generated

A living room filled with furniture and a large window

Description automatically generated

A house with trees in the background

Description automatically generated

A house with trees in the background

Description automatically generated

 

 

PART 2: RECOVER HOMOGRAPHIES + WARP IMAGES + IMAGE RECTIFICATION

 

Next, I wrote a function to calculate the homographic transformation between the first image to the second image. I selected corresponding points and solved for H in the equation p’ = Hp. To give a better result, I used multiple points and turned this into a least squares problem solving for the entries in H.

Next, I wrote a warp function to take the first image and apply the homographic transformation to align it with the second image’s perspective. To test my two functions so far, I took a couple side view photographs and rectified them to show a top view image. Here are some of the results.

 

Original

Rectified

A close up of a door

Description automatically generated

A close up of a tiled floor

Description automatically generated