Posts Tagged ‘openframeworks’

Recently I uploaded a few little OpenFrameworks addons to Github; nothing special, but maybe someone could use them, so:

  • ofxVibe is a test implementation of the ViBE BG subtraction algorithm.
  • ofxIniParser, as its name suggests, is a tool for reading/writing ini files.
  • ofxBase64 is base64 encoder/decoder that includes a set of functions to embed/read ofPixels into xml files.
  • ofxAvailableSpace is just a quick way to check the available space in the file system.

Read Full Post »

Since my average day involves last minute deployment on never_seen_before, often remote systems, I like my software self contained.

When working with 3rd party OSX dylib libraries, embedding everything you need in your bundle sometimes proves to be problematic and, as soon as you try to link, you get an ugly:
dyld: Library not loaded
This happens because your library is not were it expects to be; to see were your library wants to be placed, you simply have to open a terminal and:
$ otool -L /pathToLib/yourLib.dylib
The output will look something like this:
/usr/lib/yourLib.dylib (compatibility version 1.0.0, current version 1.0.0)
which means that if you put yourLib.dylib in /usr/lib/, your software will magically start to work.

If you can’t recompile the library, there’s not much you can do to convince it to live happily in a different folder; luckily you can still tell your application to ignore what the library is saying and to look for it in a different place. Back to your terminal:
$ install_name_tool -change /usr/lib/yourLib.dylib /pathToLib/yourLib.dylib /pathToApp/AppName.app/Contents/MacOS/AppName
Now when you double click on your app, it will run correctly.

Cool: this trick allows you to put a dylib wherever you wish, so you can use it to embed a library in your bundle. I’m going to show the steps needed to do it in an OpenFrameworks project, but it’s going to be more or less the same for any XCode project:

  • open you XCode project and drag your dylib library in the frameworks/3rd party frameworks group
  • go to the Build Phases page, scroll down to Copy Files, set Destination to Frameworks and add your dylib to the list: this will copy the library into the Frameworks folder in your bundle.
  • still in the Build Phases page, scroll up to Run Script and add the line that will tell your app where to look:
    install_name_tool -change /usr/lib/yourLib.dylib @executable_path/../Frameworks/yourLib.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME";

Read Full Post »

Function pointers have probably the ugliest syntax in the whole C++ language: almost all the coders I know cursed them at least once.

In order to make my function pointing experience a little more comfortable, I made an ofxFunctionPointer OpenFrameworks addon; OF 9.0 will probably have a proper C++11 support, so I kept things simple and basic, but it’s easy to use, easily extendable and comes with a well commented example.

If you think you can find it useful, it’s on GitHub.

Read Full Post »

Here’s the teaser for the performance I’ll present @ Borderline Biennale 2011 together with Stefano Moscardini and Lukas Zpira. There will be blood, steel, neural waves, computer vision and synths; if you can be around Lyon at the beginning of september, be there!

Read Full Post »

As you could imagine reading my last post, I’m working on an interactive floor using a projector + Kinect combo. It’s still early to speak about the final installation, but I just recorded a couple videos of the current beta and wanted to share them.


Read Full Post »

I’m wrapping Chris Evans’ OpenSurf library into an OF addon and I can say the results are pretty good:
1) I can get get SURF interest points in images and videos
SURF points

Read Full Post »

The traditional limitations of augmented reality (as far as something that is a couple years old can be traditional) can be summarized like this:

  • your virtual world lives on a marker. also so-called markerless AR solutions make use of some kind of beautfied marker in the form of a photograph, drawing, etc. The only exception that come to my mind is PTAM, but it still needs camera calibration (read: waving the camera so that the software can make an idea of the physical space) Having a physical object that pops out a virtual world can be a great feature, but in some scenarios you simply don’t want to carry a marker with you.
  • your virtual world does not really interact with the physical one. You can’t easily touch what’s on your marker or make it collide with something that does not live on marker too.
  • there is no foreground/background segmentation. Normally virtual stuff is always in foreground, you can’t stick your hand in front of it.

With the depth data captured by the kinect you can avoid these limitations: you can project a 3d virtual world over a the 3d physical world, you can make a physical object collide with your desk or your hand, you can walk between physical and virtual stuff and have a correct foreground/background segmentation.

Here’s a quick demo of this deep augmented reality idea: the virtual ball has x,y,z coordinates that make sense also in the physical room and can bounce on people and object.

Read Full Post »

Older Posts »