Skip to content

Augmented Reality system for real-time rendering of 3D objects in video feed with marker detection and camera calibration in C++

Notifications You must be signed in to change notification settings

shivaniNK8/Augmented-Reality-Cpp

Repository files navigation

Augmented-Reality

About Project

This project is about Camera Calibration and Augmented Reality. The objective of the projected is to detect the target in the scene and place a virtual object in the scene relative to the target. I have used image of a checkerboard as the target. The target has 9 columns and 6 rows, which gives 54 internal corners. The system starts with detecting the target and extracting it corners. After creating a function to detect and extract the corners of the target, a set of images was created for camera calibration. Camera Calibration is done by taking multiple pictures of the scene with target from different angles. Calibration feature is used to get the intrinsic features of the camera like focal length, center of image etc.

After getting camera matrix and distortion coefficient from the camera calibration step, it is used to calculate the transitional vector and rotational vector. Then multiple complex 3-D objects were created using wavefront obj files and manually to project them in the scene with 2-D target.

To run the program-

Need main.cpp, calibrate.cpp, calibrate.hpp, ObjectParser.cpp, ObjectParser.hpp, .obj file. Open them in an IDE and run the program after adding necessary opencv library files.

Command line argument: obj_path : path to wavefront obj file

Key Presses:

  • 's' - save the current frame for calibration and calibrate using calibration images
  • 'e' - show extracted corners for a calibration image
  • 'd' - Detect the pattern and draw axes
  • 'h' - Project chair on the target
  • 'b' - Project cube on the target
  • 't' - project table on the target
  • 'p' - overlays an image on the ArUco markers
  • 'r' - Detect and extract the matching ORB features between two images
  • '3' - Project 3D obj file object
  • 'a' - detect ArUco markers
  • '7' - detect and display Harris corners

About

Augmented Reality system for real-time rendering of 3D objects in video feed with marker detection and camera calibration in C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages