Table of Contents
This repo contains simple python script to create augmented reality using OpenCV and april tags. Camera calibration must be done in order to get stable AR results. For this purpose capture_calibration_images.py
and camera_calibration.py
is also also provided which captures images with a button press and produces calibration data with the images in a directory respectively.
This project is built with the below given major frameworks and libraries. The code is primarily based on python.
conda environment is ideal for creating environments with the right packages. Pip is required to install the dependencies.
Simply clone the repo cd into the right directory and run the code. Step-by-Step instructions given below.
-
Clone the repository using
git clone https://github.com/sudharsan-007/Augmented-reality-webcam.git
-
cd into the directory Augmented-reality-webcam
cd Augmented-reality-webcam
-
Create a Environment using
conda create -n ar_april_tag conda activate ar_april_tag
-
Install Dependencies
pip install opencv-python
-
Run
capture_calibration_images.py
and capture some images for calibration.python capture_calibration_images.py
-
Run
camera_calibration.py
to generate calibration matrix and distortion index.python camera_calibration.py
-
Run
ar_april_tag.py
to generate calibration matrix and distortion index.python ar_april_tag.py -t DICT_4X4_100
Distributed under the MIT License. See LICENSE.txt
for more information.