Feeds:
Articoli
Commenti

Archive for the ‘open source’ Category

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.
Annunci

Read Full Post »

I strongly believe in R/D and I strongly believe in the importance of academic research, so I’m kind of happy to share a little preview of contribute to the experimental work carried out by Parma University’s Neuroscience Department (yes! those rockstars who discovered mirror neurons!).
Here’s a short video demoing a software tool to be used in the scope of experiments on the perception of self. I’ll write more about it as the research progresses; for now let’s just say that the idea is measuring in a precise way how much a face needs to change for you to stop recognizing it.

Read Full Post »

Featured image
Vomitino is a “tongue in cheek firmware” for the HexBright flashlight.
The word “vomitino”, in italian, means something like “little puker” and was chosen for 2 reasons:

– it follows the -ino desinence tradition, so common in Arduino based projects

– it refers to the fact that the firmware implements a “stroboscopic dazzle mode”, inspired by the LED Incapacitator, a security device that is rumoured be able to stop an hypothetic attacker, inducing vomiting and disorientation.

While I used the same frequency range, the Vomitino lacks some of the features of its original inspirer (i.e. multicoloured light). It’s meant to be just a joke and should not be considered a “self defence tool” at all: in the end it’s just very bright and somewhat annoying strobe light, just like the ones you find in disco 🙂
If you’re interested in the original device, go check Lady Ada’s complete replica. If you’re curious, but don’t want to invest too much time and money into it, you can grab my humbler version on github and flash it on your HexBright.

Keep in mind that some people have weird reactions to flashy lights, some simply do not like them and I’m not responsible if you nag poeple with my code 🙂

Read Full Post »

A few weeks ago I met a young designer interested in digitally augmented mirrors: in particular he was interested in messing with people faces. Since this is the kind of stuff I have some experience with, we ordered a couple drinks and brainstormed about how he could do this and that.
I ended up writing a little demo showing how to easily change parts of people’s face in realtime and, since I think it could be helpful for other people too, I wanted to share it and quickly explain how it works.
Basically I track the user’s face with Jason Saragih’s library and create a mesh that can be overlaid on the lower part of the tracker’s face mesh; then I can use this “partial mesh” to create a UV map from the user’s mouth expression, or to blend a saved mouth expression into the live feed.

You can find the source code on my github and here’s a video showing how it works:

Read Full Post »

Today I was writing a function to save a specific configuration file from an OF application and I noticed that ofSystemSaveDialog() (the function commonly used to open a save dialog) does not allow me to specify a default save path.

Since I wanted my files saved in a specific location, I quickly wrote a custom function that includes a path argument; it’s super easy and mac only (Objective C ++), but I thought someone could find it useful, so here it is:


ofFileDialogResult customSaveDialog(string defaultName, string messageName, string defaultPath){
ofFileDialogResult dr;

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSSavePanel * saveDialog = [NSSavePanel savePanel];

[saveDialog setMessage:[NSString stringWithUTF8String:messageName.c_str()]];

if(!defaultPath.empty()){
NSString * s = [NSString stringWithUTF8String:defaultPath.c_str()];
s = [[s stringByExpandingTildeInPath] stringByResolvingSymlinksInPath];
NSURL * defaultPathUrl = [NSURL fileURLWithPath:s];
[saveDialog setDirectoryURL:defaultPathUrl];
}

[saveDialog setNameFieldStringValue:[NSString stringWithUTF8String:defaultName.c_str()]];

NSInteger buttonClicked = [saveDialog runModal];

NSWindow * appWindow = (NSWindow *)ofGetCocoaWindow();
if(appWindow) {
[appWindow makeKeyAndOrderFront:nil];
}

if(buttonClicked==NSFileHandlingPanelOKButton){
dr.filePath = string([[[saveDialog URL] path] UTF8String]);
}
[pool drain];

if( dr.filePath.length() > 0 ){
dr.bSuccess = true;
dr.fileName = ofFilePath::getFileName(dr.filePath);
}
return dr;
}

Read Full Post »

Recently a client bought a Kinect to be used with an OpenFrameworks app I wrote for them; we were doing some normal depth tracking, so we did expect a smooth ride, but, after a few seconds from when the Kinect got plugged, the application froze.
To keep it short, it seems that the Kinect model 1473 (the one you’ll find in shops these days) comes with a new firmware that auto-disconnects the camera after a few seconds, causing a freeze whenever you plug it into a computer and try to use it with libfreenect; this of course means that most creative coding toolkits are affected by the problem: I did run into it using ofxKinect, but it will happen also with the libreenect based Cinder Block, Processing library, etc…

Luckily Theo Watson already came up with a solution: you can find a fixed libfreenect here or, if you’re using OF, you can update to the last version on github.
The fix will work also with the Kinect for Windows and, of course, it will not break compatibility with the older 1414 Kinects.
Finally, if you don’t know the model of your Kinect, this picture will explain how to check it out:

Read Full Post »


TED.com just published the video of the last performance I coded for Marco Tempest.
As always the development process was really a stimulating experience: I had the opportunity to remodel an old project by the creative coding rockstar (and dad of OpenFrameworks) Zach Lieberman and teamed up with Kevin Blanc, one of the best art directors a coder could dream of.
The performance itself is a calibrated mixture of experimental augmented reality glasses, 3D special effects and card manipulation dexterity, but, as it often happens in Marco’s work, the narrative component is always central: every shuffle reveals a story hidden inside the deck of cards, following a tradition that dates back to a 19th century story called The Soldier’s Prayer Book. If you’re interested, Marco tells more about this story and about the narrative use of playing cards in an interview published on TEDBlog.

Read Full Post »

Older Posts »