X Y tracking

NovoSeven's icon

So, I'm currently working on a program that will eventually use colour tracking to change certain parameters in a patch. The problem I'm having is X Y tracking.

So far I've got a qmetro and a jit.qt.grab object going into a jit.pwindow which is taking video from my built-in webcam and outputting it in real-time into the jit.pwindow. What I would like to do next is take the X Y coordinates of particular colours and output them.

This is where I'm struggling. I've hooked up a jit.findbounds underneath the jit.pwindow as I thought that might output me the X Y coordinates of particular colours but either I'm doing it wrong or it's the wrong object to use.

Any help that could be given would be brilliant.

NovoSeven

Roman Thilenius's icon

you could put an object like ubutton or lcd in the background and use its mouse data.

MIB's icon

jit.findbounds is the object you want. you will need a suckah object on top of your jit.pwindow to select the color and send it to jit.findbounds. have a look at jitter tutorial 25.

laonikoss's icon

Try searching the forum for other similar threads, and save both you and us a lot of time:

Use [jit.unpack] and [jit.brcosa] to select and enhance whatever colours you are trying to detect, and then feed those into [jit.findbounds] to track them. (Use the [suckah] object, as MIB said, to select the colours more accurately, although you will still need to fine-tune the values to make it practically functional.)