In this project, an image is warped onto a video using homography, based on either four ArUco markers or a chessboard pattern. Using the Lucas-Kanade method, key points within the chessboard and ArUco markers can be tracked across consecutive frames of the video. Finally, with the help of homography, the image is seamlessly augmented into the video feed.
- Clone the repo
git clone https://github.com/aminlashgari/ArUco-Chessboard-AR-Projection.git- Check out the
requirements.txtfile and install the dependencies
pip install -r requirements.txt- Run the
main_AR.pyfile
Note: The marker_generation.py file can be used to generate ArUco markers. Alternatively, there are several online tools available for
generating ArUco markers with arbitrary IDs and sizes, such as Oleg Kalachev Website.
There are two examples: the first shows the output of a video with a chessboard pattern, while the second features non-identical ArUco markers. Near the end of the second video, the ArUco markers are being displaced; however, the key points are still successfully tracked, and the warped image remains stable and undistorted.
Sample_1.mp4
Sample_2.mp4
- The video with the chessboard pattern was taken from IUST Computer Vision course.
- Some parts within the project were developed with help from PyImageSearch blogs on ArUco markers.