Images were shot mostly from the room where I am currently quarantined at.
Part 2: Recover Homographies
Following this image from lecture, further derivation was done to obtain a nice equation form (derivation attached in code file).
np.linalg.lstsq was used to solve equation to recover coefficients of H.
Part 3: Warp The Image
The warpImage function was implemented using inverse warping
2 homographies was created – H_warp_to_original and H_original_to_warp
H_original_to_warp was used to find the bounds of the warped images, but passing in the coordinates of the corners of the original image
H_warp_to_original was used for inverse warping
Part 4: Image Rectification
Planar surfaces were taken and warped such that they are frontal parallel.
Description
Original
Rectified
Biscuit box
Door
Part 5: Mosaic
Input
Image 1
Image 2
Image 3
Ouput
The images look more or less smooth except for the parts where there are a lot of fine details – which is where the images are overlaid. Perhaps it would look better with other reference points.
The one area to be optimized is how the images are overlayed – curently, np.max is used to merge the two photos together
Coolest things learnt
Probably that the result is highly influenced by the area of correspondence – if the correspondence area picked is highly detailed, the mosaic would likely not look great. I am curious to see if there are any techniques available to mitigate this, especially in manual stitching.
CS 194-26 Project 5A [acc id: aez]
Overview
Part 1: Shoot The Pictures / Foreword
Part 2: Recover Homographies
np.linalg.lstsq
was used to solve equation to recover coefficients ofH
.Part 3: Warp The Image
warpImage
function was implemented using inverse warpingH_warp_to_original
andH_original_to_warp
H_original_to_warp
was used to find the bounds of the warped images, but passing in the coordinates of the corners of the original imageH_warp_to_original
was used for inverse warpingPart 4: Image Rectification
Part 5: Mosaic
Input
Ouput
np.max
is used to merge the two photos togetherCoolest things learnt