Augmented Reality Junkie

AR Developer | Postgraduate Research Student |

PTAMM porting to OSX Leopard

with one comment

PTAMM is an extension of the work by Georg Klein on the PTAM project, which adds multiple map support, you can read about it at the project’s website. I would advise that you download and compile PTAM first, it comes with great instructions and I have some troubleshooting notes here as you will need all the same libraries.

Now, unlike PTAM, PTAMM doesn’t come with a tailored makefile for OSX or a file. Luckily the codebases are very similar and so, with some editing it is possible to compile to OSX.

I will assume PTAM is stored in PTAM_src/ and PTAMM in PTAMM_src/ for ease.

Copy your from PTAM_src/ to PTAMM_src/

Then copy /PTAMM_src/Builds/Linux/Makefile to PTAMM_src/

Changes to first:

Beneath the includes section add the line:

 using namespace PTAMM { 

And then add the closing } at the end of the file (so the braces surround everything but the includes)

Save and exit. Then the Makefile

First locate the COMPILEFLAGS arguments, and you should see -D_LINUX. Replace this with -D_OSX

Now change your LINKFLAGS so that it matches the following:

LINKFLAGS = -framework OpenGL -framework VecLib -lGVars3 -lcvd $(3DSLIB)

It is vitally important that the reference to the OpenGL framework is there otherwise nothing will compile. Now you should be able to follow the standard install instructions and everything should go OK.

These instructions were made on a leopard (10.5.8) box. Snow Leopard instructions to follow from Andrew Hatch. I’ll link here when they are ready.


Written by Adam Clarkson

August 17, 2010 at 4:22 pm

One Response

Subscribe to comments with RSS.

  1. Hi Adam Clarkson,

    I did follow the instruction on manual as well as your tips here for my Snow Leopard 10.6.

    I can run the CameraCalibrator well and get the RMS error down to 0.15. That’s really good.

    However, the camera.cfg doesn’t created after I click save. Although the message is saved.

    I then grap the camera.parameters and create the file camera.cfg manually in the PTAMM folder.

    Then I run PTAMM, the message I have is as:

    tle-macbook:~ tle$ /Users/tle/Src/PTAMM/PTAMM ; exit;
    Welcome to PTAMM
    Parallel tracking and multiple mapping
    Copyright (C) Isis Innovation Limited 2009

    Parsing settings.cfg ….
    ! GUI_impl::Loadfile: Failed to load script file “settings.cfg”.
    VideoSource_OSX: Creating QTBuffer….
    This will open a quicktime settings planel.
    You should use this settings dialog to turn the camera’s
    sharpness to a minimum, or at least so small that no sharpening
    artefacts appear! In-camera sharpening will seriously degrade the
    performance of both the camera calibrator and the tracking system.
    > .. created QTBuffer of size [640 480]
    ? GV3::Register: TooN::Vector Camera.Parameters undefined. Defaults to 0.5 0.75 0.5 0.5 0.1

    ! Camera.Parameters is not set, need to run the CameraCalibrator tool
    and/or put the Camera.Parameters= line into the appropriate .cfg file.


    [Process completed]

    So It seems that it is failed to load the script file settings.cfg?

    Any idea how to overcome this?

    Thank you


    March 17, 2011 at 11:09 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: