Recognize moving QR-Code?

Hey!

is it possible to recognize a qr-code with touchdesigner?
I wanne read it out and track the orientation …
(Best solution for me would be without the Blobtrack, because this Top always crash)

thanks for every hint!

I actually have the same problem. I’d like to use a six sided dice (30x30x30cm) with different qr codes on each side and would want Touchdesigner to recognize the code on the side facing up through a camera (visible light or infrared) overhead. This should then trigger different actions (sounds, movies) depending on the code. Can Touchdesigenr do that?

Best regards,
Sven

I hope to have a program working in a month or two that will recognize and track ARToolkit markers. our old code is broken but slowly being adapted to the newer versions of TouchDesigner. only snag is that it will need the Pro or FTE commercial version to work. :slight_smile:

There are other fiducial tracking programs out there that can send OSC messages though if you don’t need to composite geometry to the markers etc.

I think these guys have a standalone application that can send OSC messages that Touch could pick up. all you’d need would be the ID of the markers and calculate which one is the middle one (the dice face you want to read).

if there’s a python module for QR codes, that might be do-able in touch too. The C++ Top might be another way to get QR codes in then to use DATs to shape the strings into URLs etc.

rod.

Just thinking more about this.
a quick and dirty way to read a QR code might be to use zbar zbar.sourceforge.net/
which can be found in a stand-alone command-line version. I assume there’s a windows build. If so, you could run it using touchdesigner’s system command, then pipe the output to a DAT or to a file if the DAT trick doesn’t work.

there is a python wrapper code.google.com/p/qrdecoder/wiki … stallation for zbar so it might be possible to actually install it as a python module for tighter integration.

Regarding tracking them in realtime, you need something that will both recognise the code then determine its rotation/translation matrix then translate that into angles (or feed them to a chop or DAT for the matrix parameter in a component (geometry or null for example))
Are you married to QR codes in particular (to get and interpret a URL, for example)? If so, there may be things that do that with QR codes but I have not been looking yet.

If you just need to be able to identify a marker and track its location and rotations, then something like ARToolkit would work. you’d need to write a program though. There may be something out there that just tracks markers and converts to OSC messages. ARtoolkit uses a statistical method to recognise symbols so the more markers you have in the list to recognise, the slower it gets. It’s fine for 20 markers though but for, say 200 markers, you need something that uses something more like a bar code to identify the marker (as does OpenTracker below).

OpenTracker also provides a few options studierstube.icg.tugraz.at/opentracker/
once again, these are all libraries for programmers rather than read-to-go programs that we can just use :frowning:

I don’t know enough about programming to tell if these could be used with the C++ objects in touch or imported through python in Touch088 but that would be righteously wonderful.

it’s also worth mentioning that tracking patterns like this works well with flat things but not on t-shirts worn by curvy humans for example.

for what Sven wants to do, I’m almost certain that Reactivision reactivision.sourceforge.net/ can do what you need.

vimeo.com/channels/reactivision

Rod.

Hi Rod,

thanks a lot for your thoughts and replies. Very helpful stuff! I will look into it and keep you posted on my progress!

Cheers from Shanghai,
Sven

Hi Rod,

Reactivison looks very promising (that link already cost me ten bucks because I just had to have the Reactable app for Android :slight_smile:). Will see how far I’ll get with the framework. Would also love to see your AR Toolkit app in action. Slowly feeling confident enough to use Touchdesigner in commercial settings.

Best,
Sven

Here’s a hastily-made video from 2008.
our code worked with the 2008 version of Touch but needs to be updated to work again with the new versions. (must mirror these on vimeo).
youtube.com/watch?v=0U4HY-CC … ature=plcp

like I said before though. this needs the shared memory operators that are only available in FTE commercial and Pro. version of touch. should be alive in a month or so.

r.

that’s some cool stuff! really looking forward to giving it a whirl. I did a few things with ar toolkit and unity and really liked the results. stable, reliable, production ready.

sven

hey rod …
thank you for help … the reactivision stuff is awesome! nearly that what i was looking for.

norman

Hi Rod,

Reactivision is the right direction and connecting it to Touchdesigner was easy with an OSC in Chop. Everything is running smooth with one active Reactivision QR-Code. The problem starts when there are two or more of the codes. The OSC in Chop then starts randomly switching between the different codes visible to the camera.
Among the signals that I get via the OSC in is also the ID of the current QR Code (I’ve attached a screenshot). My idea was to have several OSC ins and focus each one of them on only on unique ID Code. Unfortunately I have no idea if and when yes, how this can be done. I guess it would involve some kind of If id=xx Then read position/angle/… Else ignore.
Any idea? I’d be grateful for any help on this.

Best regards,
Sven

I know I’m reviving an old post here, but was wondering if there’s any progress on solving this question of inputting QR Code data (text) via a webcam/videodeviceIn or using OpenCV perhaps?

Thanks

Just following up on my previous post:

Found this, unfortunately I’m not very adept with Python enough to use this:

I managed to do this
MF_QRCodeTracking3_phil
qrCodeTracker.tox (644.9 KB)

install Python and run this command to install the pyzbar package

python.exe -m pip install pyzbar --target=“C:\Program Files\Derivative\TouchDesigner099\bin\Lib”

3 Likes

@pdubost very interesting. I’ll be giving this a try! great work!

I’m sorry I have pyzbar installed on anaconda, can’t I do that?

The module cannot be found.