adarshmalapaka / ar-tag-virtual-cube

Project-01 of ENPM 673 - Perception for Autonomous Robots (Spring '22)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Superimposing a Virtual Cube on an AR Tag

Project-01 for the course ENPM673: Perception for Autonomous Robots (Spring 2022).

AR Tag Detection

Flowchart

Edge Detection using FFT

Extracted Corners and Edges

AR Tag Decoding

Flowchart

Implementation

Decoding Tag ID

AR Tag Tracking

Flowchart for superimposing an image on Tag

Superimposed Testudo image on Tag

Flowchart for placing a virtual cube onto Tag

Placed virtual cube on Tag

Media Files & Codes

├── 1tagvideo.mp4                     # Main video file for Q2.
├── tag_single_frame.jpg              # Single frame image for Q1(a).
├── tag_ref_image.png                 # Reference tag image for Q1(b).
└── testudo.png                       # Testudo template image for Q2(a).


├── ARTag_detection.py                # For detecting the AR tag from tag_single_frame.jpg using FFT.
├── ARTag_decode_reference.py         # For decoding the AR tag info from tag_ref_image.png.
├── ARTag_decode.py                   # For decoding the AR tag info from a single frame of 1tagvideo.mp4.
├── ARTag_testudo_video.py            # For superimposing testudo.png on the AR tag in 1tagvideo.mp4.
└── ARTag_cube_video.py               # For constructing a virtual cube on the AR tag in 1tagvideo.mp4.

Dependencies

  • cv2
  • numpy
  • scipy
  • imutils
  • matplotlib

Running the Codes

Ensure all the media files are in the same directory as that of the Python scripts.

  1. For detecting the tag using FFT:

     	`python3 ARTag_detection.py`
    
  2. For decoding the reference image:

     	`python3 ARTag_decode_reference.py`
    
  3. For decoding a single frame from the video:

    	`python3 ARTag_decode.py`
    
  4. For superimposing the Testudo image on the tag:

      	`python3 ARTag_testudo_video.py`
    
  5. For constructing the cube on the tag:

      	`python3 ARTag_cube_video.py`
    

About

Project-01 of ENPM 673 - Perception for Autonomous Robots (Spring '22)

License:MIT License


Languages

Language:Python 100.0%