Coder Social home page Coder Social logo

david-edoh / ptam_unity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from visionertech/ptam_unity

0.0 0.0 0.0 91.41 MB

Using PTAM in Unity Example

Makefile 0.17% C++ 65.27% C 22.22% MATLAB 0.02% M4 0.10% Objective-C 7.06% Awk 0.07% Gnuplot 0.01% CMake 0.04% HTML 3.49% CSS 0.09% XSLT 0.56% Shell 0.26% R 0.01% Assembly 0.38% Python 0.02% HLSL 0.01% C# 0.21% ShaderLab 0.03%

ptam_unity's Introduction

PTAM in UNITY

This is a project in which PTAM dll worked together with Unity for VisionerTech VMG-PROV. It localizes the headset automatically by PTAM. Also more content could be created with Unity.

Requirement:

  1. Recommended specs: Intel Core i5-4460/8G RAM/GTX 660/at least two USB3.0/
  2. Windows x64 version.(tested on win7/win10)

Installation

  1. Download and install Visual Studio 2012, the download address is here: https://www.microsoft.com/zh-cn/download/details.aspx?id=30682

  2. Download and install OpenCV(version 2.4.X) as: http://docs.opencv.org/2.4.11/doc/tutorials/introduction/windows_install/windows_install.html

  3. Open "PTAM_UNITY/RenderingPlugin/VisualStudio2013/RenderingPlugin.sln", then change settings for visual studio project linked with OpenCV: http://docs.opencv.org/2.4.11/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html

  4. Download and install Unity(5.4.0f3), the download address is here: https://unity3d.com/unity

How to Run

  1. Build "/RenderingPlugin/VisualStudio2013/RenderingPlugin.sln" release version, RenderingPlugin.dll will copy to corresponding unity folder automatically.

  2. Put camera parameters got from stereo_calib or stereo_calib_executable to "/UnityProject/save_param/"

  3. As in stereo_seethrough, use Unity open "/UnityProject/" folder. The StereoCamera object is made of two cameras. Every camera has its own plane object, which images got from real VMG PROV camera are rendered on. Connect UseRenderingPlugin.cs and UseRenderingPlugin_right.cs scripts with left plane and right plane. Then a ball as an AR object are shown in foreground. alt text

  4. Put the cameras towards a plane target. Then double click "scene", click run and then click "start" afterwards. alt text

  5. If the left image and right image are swop——left plane showing the right camera image and right plane showing the left camera image, we should change UseRenderingPlugin.cs script from:

     if (OpenWebCam (1, 0) && init_SLAM_AR()) {     
    

to:

     if (OpenWebCam (0, 1) && init_SLAM_AR()) {

ptam_unity's People

Contributors

stomachache007 avatar

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.