ofxMagnetic is now available!

I’ve opened up the source code for Magnetic!

http://www.bantherewind.com/magnetic

Follow the link to learn all about it and watch a video showing off some of its features.

I’ve set up a Google Code page but still need to get everything up there. You can download a ZIP from the URL above. I haven’t had time to add the last few features I’ve wanted to get on there. So I’m opening it up to the community. Hopefully it will also make a great learning tool for those wanting to try their hand at things like peak tracking, calibration, image processing, etc.

Looks very sexy, thanks for sharing.

Thanks for sharing! Great stuff!

Hello I´m trying to compile it on xCode and apear this error on ofxMagneticApp.h

“Crosses initialization of ´int lastDeviceID´” at:

  
case SETTING_DEVICE_ID:   
  
int lasDeviceID = __deviceID; <----  
..  
..  
..  

and then at “Jump to case label” at:

  
case SETTING_DILATE <----  

and in SETTING_ERODE, SETTING_FLIP_HORIZONTAL, SETTING_FRAME_RATE, … etc … until case SETTING_THRESHOLD

Any idea?
Thanks one more time

Had a little trouble building this on XCode 3.2 on Snow Leopard as well.

Crosses initialization of ´int lastDeviceID´

No problem, just add braces {} around the code after case SETTING_DEVICE_ID: and before break:

After that problem was solved I was getting a “EXC_BAD_ACCESS” with the error occurring when the calibration xml was first checked. It seems XCode was being strange about the “calibration.xml” path. Changed calibration.xml to calibrate.xml in the data path, also changed the following part of ofxMagneticApp.h setup in order to debug.

  
// Load XML  
		if (!__configXML.loadFile("config.xml"))   
                   exit();  
		else  
                   cout<<"config loaded successfully.\n";  
		string name = ofToDataPath("calibrate.xml", false);  
		if (!__calibrationXML.LoadFile(name, TIXML_ENCODING_UTF8))  
                   exit();  
		else  
                   cout<<"calibration loaded successfully.\n";  

Works great now. Excellent stuff.

Right, sorry I should mention, and will add to the info page, that this has only been run/tested on Windows.

If anyone wants to build an XCode package, I’ll post it up. I just got a Mac and have XCode on it, so I could maintain it from there. I just haven’t converted this over yet.

EDIT: Come to think of it, just adding “ofToDataPath” wherever I reference data would be a good idea (not need in Windows version).

GC page is up
http://code.google.com/p/ofxmagnetic

Took down the zip and am just working from the repo now. 0.2.7 is up to address these bugs. Should compile no problem now.

Sweet! Looks excellent. Tomorrow I start playing with it.
Thanks!!

builds correctly under linux; if you want me to I can send the project.

Awesome, would really appreciate that!

Any tips for the mac compilation? I am a bit new unfortunately to much of this. I wondered if I should attempt using the mac version of CodeBlocks instead of xcode.

I followed the directions from the github and have the ofxmagnetic in the addons folder with examples,bin & data folder. I also replaced the libs/video files as recommended.

Thanks for any tips.
This program looks really amazing- I would love to get it running if possible.
Robbie