Tim M 57b5cefde5 Updated all `.md` files to contain newest image 2 tahun lalu
..
README.md 57b5cefde5 Updated all `.md` files to contain newest image 2 tahun lalu
augmented-reality-example.jpg 0af46323bc added augmented reality using aruco markers 5 tahun lalu
augmented_reality_with_aruco.cpp 0af46323bc added augmented reality using aruco markers 5 tahun lalu
augmented_reality_with_aruco.py 0af46323bc added augmented reality using aruco markers 5 tahun lalu
generate_aruco_markers.cpp 0af46323bc added augmented reality using aruco markers 5 tahun lalu
generate_aruco_markers.py 0af46323bc added augmented reality using aruco markers 5 tahun lalu
new_scenery.jpg 0af46323bc added augmented reality using aruco markers 5 tahun lalu
test.jpg 0af46323bc added augmented reality using aruco markers 5 tahun lalu
test.mp4 0af46323bc added augmented reality using aruco markers 5 tahun lalu

README.md

Augmented Reality using ArUco Markers in OpenCV (C++ / Python)

This repository contains the code for Augmented Reality using ArUco Markers in OpenCV (C++ / Python) blog post.

download

We show how to use the AruCo markers in OpenCV using an augmented reality application to replace the image inside a picture frame on a wall to display new images or videos in the frame.

Compilation in C++

g++ -std=c++11 augmented_reality_with_aruco.cpp -o augmented_reality_with_aruco.out `pkg-config --cflags --libs opencv4`

How to run the code

Command line usage for running the code

  • Python

    • A single image:
    python3 augmented_reality_with_aruco.py --image=test.jpg
    
    • A video file:
    python3 augmented_reality_with_aruco.py --video=test.mp4
    
  • C++:

    • A single image:
    ./augmented_reality_with_aruco.out --image=test.jpg
    
    • A video file:
     ./augmented_reality_with_aruco.out --video=test.mp4
    

Results

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.