CS 194 Proj5 Part A
Kehan Wang
Recover Homographies
To recover the Homography transformation matrix, I take apart the p = Hp’ equation and rearranged it into Ax = b format, of which x is a vector of the 8 degrees of freedom. Then I was able to call np.linalg.lstsq to solve for the 8 unknowns.
Warp the Images
My warping pipeline is as the following:
- compute target shape of the warped image using H and forward homography
- generate a list of all target warping points
- inverse warp target pts to im pts
- filter all out-of-bound points in all the im points
- interpolate to find pixel values of in_im pts
- fill in target from the interpolation values
Example image warp result:
- original image
- target image
- warp result
Image Rectification
By warping towards a rectangle, we are able to rectify a given image.
Example:
-
original image
-
warp result
CS 194 Proj5 Part A
Kehan Wang
Recover Homographies
To recover the Homography transformation matrix, I take apart the p = Hp’ equation and rearranged it into Ax = b format, of which x is a vector of the 8 degrees of freedom. Then I was able to call np.linalg.lstsq to solve for the 8 unknowns.
Warp the Images
My warping pipeline is as the following:
Example image warp result:
Image Rectification
By warping towards a rectangle, we are able to rectify a given image.
Example:
original image
warp result