Skip to content

Latest commit

 

History

History

hw3

HW3 Projective Geometry

Task

  • Part 1: Estimate Homography
  • Part 2: Unwarp the QR code on the screen
  • Part 3: Estimate the 3D illusion
  • Bonus: Simple Augmented Reality

Usage

Simply execute main.py to generate image for each part.

     python3 main.py

Part 1: Estimate Homography

  • Simple apply Homography Matrix for projection
  • Reference (Wikipedia): Homgraphy
img1 img2 img3 img4 img5
wu ding yao kp lee
Source Result
Time Square Result

Part 2: Unwarp the QR code on the screen

  • Apply Backward Warping to get pixel information (by interpolation)
Source Result
Screen Result

Part 3: Estimate the 3D illusion

  • 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
Screen Result

Bonus: Simple Augmented Reality

  • Apply Feature Detection and Projective Geometry

  • Using SIFT as feature points detector

  • Calculate Homography Matrix

  • Algorithm Flow

    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