Code Monkey home page Code Monkey logo

ofxptam's Introduction

#ofxPTAM# You will find that you have to make and copy all the PTAM requierd libraries and soureces. You can fing a detailed tutorail of how to do it on MacOSX 10.6 and 10.7 at: http://www.patriciogonzalezvivo.com/blog/?p=547

##Prepare everything for seting your addon##

  • Print the calibration pattern, run the CameraCalibrator on PTAM directory. Take some sanpshoots, optimize and save. That will make a camera.cfg

  • Move PTAM directory inside ofxPTAM addon and rename it include. So at the end every PTAM source could be found at ofxPTAM/include/

  • Copy need headers into include directory and replace your compiled libraries.

cd ofxPTAM
cp -r /usr/local/include/cvd include/
cp -r /usr/local/include/gvars3 include/
cp -r /usr/local/lib/libcvd* lib/osx/
cp -r /usr/local/lib/libGVars3* lib/osx/
  • On OSX replace GL/*.h for OpenGL/*.h on ofxPTAM/include/cvd/gl_helpers.h
//#include <GL/gl.h>
//#include <GL/glu.h>

#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
  • Add #undef check on the begining of ofxPTAM/include/TooN/TooN.h
#ifdef check
#undef check
#endif

// ...
  • Put ofxPTAM/include/cvd/Linux/capture_logic.cxx code between:
#ifdef LINUX

    while(vd.pending())
    
    // ... all the code
    
    }

#endif
  • Replace all Point type calls for BPoint on ofxPTAM/include/Bundle.h and ofxPTAM/include/Bundle.cc

  • Delete reference for main()

cd ofxPTAM/include
rm main.cc
rm CammeraCalibration.h
rm CammeraCalibration.h

##Adding ofxPTAM addon to a oF project##

  • Add the include and lib directory at the Project.xcconfig
//THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
//THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
OF_PATH = ../../..

//THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"

OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_PATH)/addons/ofxPTAM/lib/osx/libcvd-0.8.dylib
HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) $(OF_PATH)/addons/ofxPTAM/include
  • Add vecLib.framework
http://meandmark.com/blog/2011/03/xcode-4-adding-a-framework-to-your-project/
  • Copy ofxPTAM/include/camera.cfg to bin/data directory

ofxptam's People

Contributors

patriciogonzalezvivo avatar akira-hayasaka avatar

Watchers

James Cloos avatar 心跳 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.