This part explores implementing an Augmented Reality (AR) application using planar homographies.
-
Finding Correspondences:
Extract keypoints and matches between book image and first video frame using SIFT and brute-force matching.
-
Compute Homography Matrix:
Solve the system of linear equations Ax = b to find unknown homography parameters.
-
Calculate Book Coordinates:
Map the four book cover corners to the first video frame using the homography matrix.
-
Crop AR Video Frames:
Calculate and crop a central region from each video frame to match the book cover aspect ratio.
-
Create AR Application:
-
Compute homography between the book cover and all frames.
-
Update book corner locations in each frame based on the new homography.
-
Overlay cropped video frames onto corresponding book frames, creating the final AR video.
-
Matches between the book cover image and the first frame in the video
Comparison between the find homography parameters method and the built-in in OpenCV
First frame of the AR video
This part implements an image stitcher using image warping and homographies.
-
Create a merged image large enough to hold both input images after alignment.
-
Warp one image onto the other, fixing black pixels using inverse warping.
Holes generated in forward warping
Fixing holes using the inverse warping
Stiching the first and second image
Stiching the resulted image and third image