Trackmate is an open source initiative to create an inexpensive, do-it-yourself tangible tracking system. Using the project's Tracker software, any computer can recognize tagged objects and their corresponding position, rotation, and color information when placed on the imaging surface.
Using a system like the one shown here, you can track physical objects on a surface and use them to control and manipulate spatial applications on your computer. Since objects are each uniquely tagged, they can easily be mapped to particular actions, information, or relationships. See the LusidOSC project for more details about spatial applications.
Remove these ads by
Signing UpStep 1Gather all the parts
- a 12 inch x 12 inch x 1/4 inch clear acrylic or plexi sheet (often sold as a table protector)
- two 2 inch C clamps
- two thin adhesive-backed rubber feet (in a pinch, just use a few pieces of tape)
- a clamp light (found in most hardware stores)
- a 13W (60W equivalent) compact fluorescent bulb
- a mini camera tripod (found in camera stores, or online)
And finally, you need a webcam. I recommend the PS3 Eye since it is a very nice camera for the price (~$33) and there are now drivers for Windows and Mac. But any decent quality webcam that allows manual functionality (i.e., exposure control and focus) should work with this setup.
You can find most of the parts at your local hardware store (and save the cost/time of ordering online). The parts are also available via Amazon.com; here is an amazon.com list to help you find everything you need.
| « Previous Step | Download PDFView All Steps | Next Step » |







































First I installed the "macam" drivers (download and copied the library into "/Library/Quicktime" and then ran the accompanying application and 'viola the webcam was working great!
Then I printed Trackmate tags and started up trackmate and it found the right camera no problem!
After the calibration (great walkthrough by the way) I was able to cut up some of the tags from one of the other scaling templates and it was tracking!! One comment on the tag generation is that I generated a tag file (with just 4) and they're like 4" in diameter! Would be nice if the program could scale them for you. (Actually, since the "tags" were too big I cut up some of the tags from the 3x3 scaling sheet).
I'd looked around like crazy to figure out how to read the lucidOSC data and finally realized that on Trackmate it prints "OSC output on: localhost 3333" ... I don't know if there's a way to change this but that would be nice.
But at first I was still confused because I didn't realize it was UDP (yay netcat) and then I was still confused because I kept trying to connect to that addy & port and wasn't getting anything.
Eventually it dawned on me to _LISTEN_ and then I saw data packets flying! YAY!
Now for the 'bad' news, I was completely unable to find the "LusidOSC_BasicApp.pde" processing app that's mentioned a few times but from the readme that came with the LusidOSC processing bundle I quickly put this one together:
import lusidOSC.*;
LusidClient lusidClient;
void setup() {
lusidClient = new LusidClient(this);
}
// called when an object is moved
void updateLusidObject (LusidObject lObj) {
println("update object: "+lObj.getUniqueID());
println(" location = ("+lObj.getX()+","+lObj.getY()+","+lObj.getZ()+")");
println(" rotation = ("+lObj.getRotX()+","+lObj.getRotY()+","+lObj.getRotZ()+")");
println(" data = ("+lObj.getEncoding()+","+lObj.getData()+")");
}
void addLusidObject(LusidObject lObj) {
println("add object: "+lObj.getUniqueID());
println(" location = ("+lObj.getX()+","+lObj.getY()+","+lObj.getZ()+")");
println(" rotation = ("+lObj.getRotX()+","+lObj.getRotY()+","+lObj.getRotZ()+")");
println(" data = ("+lObj.getEncoding()+","+lObj.getData()+")");
}
// called when an object is removed from the scene
void removeLusidObject(LusidObject lObj) {
println("remove object: "+lObj.getUniqueID());
}
When I run it, I start to get data like:
LusidOSC :: Version 1.0 :: Feb. 2, 2009
LusidOSC :: listening for messages on port 3333
add object: 0x1FBF763F7BFA
location = (28,28,0)
rotation = (0.0,0.0,0.017453292)
data = (trackmate,0xFFFFFF,0xFFFFFF,0xFFFFEF,0xFFFFE8,0xF7F4EE,0x6D5F47)
add object: 0x018101810101
location = (-31,30,0)
rotation = (0.0,0.0,4.6774826)
data = (trackmate,0xFFFFFF,0xFFFFE7,0xFFFFD7,0xFFFFFC,0xFFFFFF,0x242216)
But then no matter how much I move the tags around or add / remove objects from the field I don't get any further output.
The protocol also seems to be very chatty... even with nothing on the plexi I got lots of packets like this:
live#bundle(/lusid/1.0,siiifseq>K/lusid/1.0,salive#bundle(/lusid/1.0,siiifseq?K??/lusid/1.0,salive#bundle(/lusid/1.0,siiifseq@K?8/lusid/1.0,salive#bundle(/lusid/1.0,siiifseqAK??/lusid/1.0,salive#bundle(/lusid/1.0,siiifseqBKb?/lusid/1.0,salive#bundle(/lusid/1.0,siiifseqCK y?/lusid/1.0,salive#bundle(/lusid/1.0,siiifseqDK
Easily more then 1 a second.
Regardless I'm super excited to have gotten this far so quickly, so (a) thanks and (b) any help would be much appreciated!
I just downloaded the LusidOSC Processing Bundle, and when you decompress the .tar.gz file, it should contain folders for 9 different LusidOSC example applications (one of which is the LusidOSC_BasicApp; that's strange that you didn't have it). The full bundle can be downloaded from here:
http://lusidosc.svn.sourceforge.net/viewvc/lusidosc/src/LusidOSCSpatialApps/LusidOSCProcessingBundle.tar.gz?view=tar
LusidOSC is a protocol layer on top of OSC (open sound control), which is a thin layer on top of UDP. The LusidOSC protocol specifies that each frame data is sent over OSC that describes the time, frame number, and each object present (with ID, position, rotation, meta data, etc.). Even though it may look chatty when printing the output, the total number of bytes is very small, especially for the capabilities of UDP.
I'm not sure what is causing Processing to not correctly see your tags. It's calling the "addLusidObject()" method, which is a very good sign, but I'm not entirely sure why things are not being updated after that. Make sure there is not a conflict on the port you are using (for example, don't have the LusidOSC simulator open at the same time as the Trackmate Tracker, or they will both be trying to push data to the same location).
You can change the LusidOSC HOST and PORT configuration (just added to version 09.06) manually in the setting.txt file. On Mac, this file can be located if you Ctrl+Click on the application and select "Show Package Contents". Then goto the subdirectory "Contents", then "Resources" and there you should find setting.txt (if you don't see it, try saving your setting once in the Tracker application by pressing {!}, the exclamation point).
As you can probably guess, the setting.txt file is a simple plaintext file that contains saved configuration variables (such as thresholds, size information, etc.). Toward the end, you should see two lines that say "localhost" and "3333" you can change those if you want to send the data somewhere else (to another machine across the network by IP address) or on a different port. Just save the file and restart the Tracker to have your settings take effect.
Hope that helps. Happy hacking!
But I tried that one again and it looks full too, so oh well *shrug*.
It might be helpful to add a link to the processing bundle to this page:
http://sourceforge.net/project/showfiles.php?group_id=249649
I'm not sure why Processing wasn't seeing the tags either. I noticed that when I rotated a tag that Trackmate would still see it but not change the orientation. I think if I'd wanted more frames it would have so it might have just been that my tags weren't getting tracked as well as it could.
Is there a start on the python lib yet? My plans involve needing some sort of parser so I don't mind writing one but thought if there was a base I could try to build from that.
I'll look into getting the Tagger to allow for saving directly as a PDF, since that file format carries with it scale information and would help to ensure proper sizing.
Some additional details about Trackmate tags can be found on the wiki:
http://trackmate.wiki.sourceforge.net/Trackmate+Tagger
You can find the latest version on the Trackmate homepage, or jump to it directly here:
http://sourceforge.net/project/showfiles.php?group_id=249646&package_id=309081
The Basic App can be found at:
http://lusidosc.svn.sourceforge.net/viewvc/lusidosc/src/LusidOSCSpatialApps/LusidOSCProcessingBundle/LusidOSC_BasicApp/LusidOSC_BasicApp.pde?view=log
The best way to get started with applications right now is to download the LusidOSC Processing Bundle from LusidOSC's site on sourceforge.
If you don't already have Processing (an easy-to-use Java environment), you can download it from the Processing site.
Each application is a project with a .pde extension. Just open it in Processing and hit the Run button. Alternatively, you can also export applications from within Processing so that other people can run them without needing to have Processing installed on Windows, Mac, and Linux.
Also, you can post your questions to the LusidOSC forums if you need more help.