- Part 1: Estimate Homography
- Part 2: Unwarp the QR code on the screen
- Part 3: Estimate the 3D illusion
- Bonus: Simple Augmented Reality
Simply execute main.py
to generate image for each part.
python3 main.py
- Simple apply Homography Matrix for projection
- Reference (Wikipedia): Homgraphy
img1 | img2 | img3 | img4 | img5 |
---|---|---|---|---|
Source | Result |
---|---|
- Apply Backward Warping to get pixel information (by interpolation)
Source | Result |
---|---|
- Apply Backward Warping to get the top view of the cross walk (pixel-wise interpolation is concerned)
- Discussion concerning the warping result is in the report.
Source | Result |
---|---|
-
Apply Feature Detection and Projective Geometry
-
Using SIFT as feature points detector
-
Calculate Homography Matrix
-
Algorithm Flow
-
Usage
python3 simple_ar.py -v [video] -m [marker] -i [input image] -o [output video] -d [for detect marker position]
-
Example Usage
-
Output an projected image in the video (Default Parameters)
python3 simple_ar.py -v ./input/ar_marker.mp4 -m ./input/marker.png -i ./input/kp.jpg -o output_kp.mp4
Example output:
output_kp.mp4
-
Output the detected position in the video
python3 simple_ar.py -v ./input/ar_marker.mp4 -m ./input/marker.png -o detectlines.mp4 -d
Example output:
detectlines.mp4
-