Image warping and mosaicing

Sarah Feng, sarah.f@berkeley.edu, Fall 2021


Shoot the Pictures

To collect images to warp and mosaic, I shot images of various Berkeley libraries where the position of the point of view is held constant, but the camera angle rotates.

missing
windows in doe
missing
windows in doe, alternate angle
missing
ceiling in doe
missing
ceiling in doe, alternate angle
missing
shelf in doe
missing
shelf in doe, alternate angle

Recover Homographies

For the corresponding sets of points (p, p') in our images, we want to compute the homography matrix H that transforms p -> p'. Since we know the H[3, 3] entry in our homography matrix is 1, H has 8 degrees of freedom. We can set up a system of equations to solve for H as follows.

missing
missing

Equation images are from this article.
Again, we already know H[3, 3] is 1.
The equations above are for sets of 4 points, but for more points we can simply have the system be overdetermined and solve with least squares to recover H.


Warp Images

Below I warped the images I shot to their alterate angles.

missing
windows in doe
missing
windows in doe, warped
missing
ceiling in doe
missing
ceiling in doe, warped
missing
shelf in doe
missing
shelf in doe, warped

Image Rectification

For image rectification, I first used images where I knew some plane was meant to be frontal.

Then I defined corresponding points by creating a rectangle knowing from the min_x, max_x, min_y, and max_y points out of the 4 points I chose in the image. Then I warped the images to this rectangle to make them frontal.

missing
boxes in music library
missing
boxes in music library
missing
sign in music library
missing
sign in music library
missing
doors in wurster
missing
doors in wurster

Blend into Mosaic

Honestly, I have gotten stuck on how to shift the warp so none of it is cut off. I think I am very close to a mental breakdown if I keep trying to figure it out so I will submit this for now and hope I can get it working in time for Part B. Very sorry.