Coder Social home page Coder Social logo

ar_business_card's Introduction

AR_Business_Card

AR Business Card done using OpenCV and OpenGL. This repository is a demonstration and it includes codes that can be used for academic orientation purposes, especially AR-related projects. A few techniques such as ArUco Marker, OpenGL API, and OpenCV libraries are utilized in this program. Please checkout the following contents for better understanding.

Requirements:

  1. OpenCV and OpenGL installation
  2. Pygame
  3. Generate ArUco Marker
  4. Camera Calibration

Contents:

main.py - main program script

marker.py - script for detecting aruco marker

objloader.py - load in 3d model and projection

matrixTrasnform.py - script for handling model view matrix and projection matrix

projeciton.py - opencv for 2d images projection

frame_to_video.py - combine images to video

Notes:

  1. Calibrate your own camera and save the values into cam_parameter/cam_matrix.txt and distorted coefficients to cam_parameter/dist_coefficient.txt
  2. You may want to generate aruco marker and set the parameter in the marker.py unless you stick to the same marker that was already in used.
  3. Pygame window is used to display the program and each frame in the window will be saved in the directory frames - you may run the script frame_to_video.py after the demonstration and get a video result.
  4. Feel free to replace all the sources in the src folder. The folder includes all the images and videos that will be projected onto the scene. projection.py handles the 2D projection (using homography matrix) while the objloader.py handles the 3D model projection. 3D models are located in the folder 3d_models.
  5. I have already recorded video for the demonstration. You may set the video path (card_cap) in main.py to 0 for real-time laptop camera capture.

Sample result (video):

output.mp4

IMPORTANT NOTE!!

This is only for academic orientation purposes and not for any business purposes. Since this is a demonstration of using OpenCV and OpenGL, you may notice that changes in background or vibration will affect performance. You may consider using Vuforia, Unity or any other kind of techniques that will boost the performance and produce a better result.

ar_business_card's People

Contributors

kaijaz123 avatar kaijaz326 avatar

Stargazers

Aoxiang(Ace) Zhang avatar

Watchers

 avatar

Forkers

guarim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.