Skip to content

Files

Latest commit

57b5cef · Jan 18, 2023

History

History
This branch is 170 commits behind spmallick/learnopencv:master.

AugmentedRealityWithArucoMarkers

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 18, 2023
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020

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.