Tony Lian's Project 4
Note: This website has both part A and part B.
PRPJECT 4 PART A: IMAGE WARPING and MOSAICING
Shoot the Pictures (20 pts)
I shoot 10 images from a garden from the same viewing point with different perspectives on my phone, with AE/AF lock that preserves lighting and focus. Some images are too bright and too dark because of this, so I pick and choose from these 10 images.
Recover homographies (20 pts)
I add at least 4 points on pairs of images used by later parts, as an example, I add 4 points to this pair of images.
Then, I turn the projection formula: $$p' = Hp$$ where p' is the objective point and p is the point that we want to warp, into a formula $$A\textbf{h}=b$$ where \(\textbf{h}\) vector includes 8 parameters that are the degrees of freedom in \(H\): $$\textbf{h} = [a, b, c, d, e, f, g, h]^T$$ For each correspondence, I add two equations:
$$a p_1 + b p_2 - g p_1p_1' - hp_2p_1' + c - p_1' = 0$$
$$d p_1 + e p_2 - g p_1p_2' - hp_2p_2' + f - p_2' = 0$$
These are linear equations that can form a system, and to be solved either precisely or with least squares if the number of equations is greater than 8 (the degree of freedom).
Warp the images (20 pts) [produce at least two examples of rectified images]
I then warp two images with rectangle structure into front-facing images.
Before warping:
With warping:
Before warping:
With warping:
The second one has artifacts because the original region is too small.
Blend images into a mosaic (20 pts) [show source images and results for three mosaics.]
Mosaic 1:
Mosaic 2:
Mosaic 3:
Optional Bells and Whistles (up to 20 pts, combined from Parts A and B)
Be creative: Image-in-Image
Original image:
Image in image:
Tell us what you've learned
I finally learned how panorama taken on the phone is synthesized. It's amazing to learn these transformations.
PRPJECT 4 PART B: FEATURE MATCHING FOR AUTOSTITCHING
Example Images:
Detecting corner features in an image (10 pts)
Harris corners on my image:
With Adaptive NMS:
Extracting a Feature Descriptor for each feature point (10 pts)
Example feature:
Matching these feature descriptors between two images (20 pts)
Matches:
Note that although the number of corners decreases a lot, there are still some mismatches. It's true that we can adjust threshold to limit the number of corners, but it causes too few corners for alignment for some images. I found that these mismatches can be addressed by RANSAC, so a little higher threshold for first/second matches (more matches) actually helps.
Use a robust method (RANSAC) to compute a homography (30 pts)
Matches:
Same color indicates the same match (a pair of matches), and it matches almost exactly, filtering out mismatches.
Proceed as in the first part to produce a mosaic (30 pts; you may use the same images from part A, but show both manually and automatically stitched results side by side) [produce at least three mosaics]
Pair 1 (left: manual, right: automatic):
Additional Ones:
Pair 2:
Mosaic (left: manual, right: automatic):
Pair 3:
Mosaic (left: manual, right: automatic):
Tell us what you've learned
I finally learned how alignment can be made efficient and effective.