Forums > Jitter

finding nemo ;-) w. motion/color tracking

August 13, 2009 | 5:07 am

Hi all
Here is a little project I have.

The goal:

Track the x y position of 5 goldfish in a fish bowl.

Plan A
I am already able to do so using the [cv.jit.track] but the points are lost way to easily.
Solution: reset the 5 point < - either where they were last seen (possible 'cause 0 is sent when point is lost).
Or I also tried: reset 5 point @ specific determined points.

The results for the data parsing-reset routine is not great. Also, as I said, the points are lost to easily to often. (the fish swim to fast!)

Plan B
Try color tracking with (jit.chromakey)&[cv.blobs.centroid] combo.

test: [jit.findbound] (tutorial 25) is perfect for tracking a single x y point color range. But if you want many?

I’ve been trying w. jit.chromakey and with/out the w. [jit.brcosa] for tweaking. < - But the result are not to great.

How could I isolate 5 points of the same color then connect then to cv.blobs.centroids?

Again , the only reason I am trying plan B is because Plan A < -points get lost to easily. I believe if it's as fast as jit.findbounds the result will be perfect.

I might be on the right track with my choice of objects for Plan B but I might doing something wrong.

Any help or advice would be greatly appreciated.

thanks in adavance

phil


August 14, 2009 | 2:39 pm

Have you tried experimenting some with the environment at all? I would think that straight color tracking might have issues with shadows, highlights, etc, and have trouble working too well.

I mess with a lot of vision based touch and interaction screens so personally I would be thinking the best bet is to get to a binary image which is showing just the fish. Off the top of my head you might try something like an array of IR leds and diffuse them behind the fish bowl so you can try and separate background from the foreground (fish). You might even be able to set an IR light on top of the bowl and track the top of the fish with an off set.

Here is a sample patch to get started. You might have already gotten a base patch going but I find with the vision tracking accurately and cleanly if I am not able to get decent data with these basic objects then it’s going to be tough. (Otherwise I am trying to expand and filter thee blobs too much and it gets too noisy)

– Pasted Max Patch, click to expand. –

feel free to email me if you have any other questions I can help with

http://www.demandevolution.com
jon@demandevolution.com


August 14, 2009 | 5:45 pm

WOw! what generosity. Thanks

I will definitely get back to you.

Unfortunately for now, after trying 3 main approaches and since the deadline is today, I have settled for the simplest less orhodox way.

Let me clarify a few things:
The event is tomorrow< - but I am also performing live music.SO have to work on sound.

But the fish thing is something I want to further develop to represent it again in the very near future. < - So yes you will here from me again. thanks

What I have settled for: Simple: jit.scissors (2 screens)/jit.brcosa/jit.findbounds = 2 pairs of (x y) values.

I figured that the most important is to feel movement variations and to parse data coming from 1 same source.

with blobs.centroids < - the N of blobs always change making hard to parse which is which.<- of course the N of index always change.

Finally, yes I have using different backgrounds to answer you question.

Thanks a lot for your interest
will write soon

phil


August 14, 2009 | 6:41 pm

I hear you about the deadline.

For future reference though, you should be able to use the cv.jit.blobs.sort object to keep track of the right one. You still might have issues when they overlap (which you could probably handle with a second camera axis or something) but it should help a bunch. Check out the help file for it. Also, you might wanna just bounce around the cv.jit objects to get ideas. When I am messing with a new idea using vision I’ll hack around a few help files and combine until I like where it’s going.

jon


August 14, 2009 | 9:38 pm

thanks again for the advice.

Check out the help file for it. Also, you might wanna just bounce around the cv.jit objects to get ideas.

Yes that is precisely what inspires ideas. I’ve been doing it for a few week for this. < - a few years for maxMSP Wink
I am not a jitter pro @ all. But up to now, I’ve been able to mostly get close to what I wanted. Mostly in the gl stuff though.

As for artistically manipulating parsed data< -I believe this comes with experience and a lot curiosity (object testing), patience and mostly focus.

That’s only thing I found weird when looking into the cv.help files, he shows you what the object does but not how to use it< - meaning parsing the values. <- probably 'cause it's nothing for advance users.

alright back to work.

phil


Viewing 5 posts - 1 through 5 (of 5 total)