Forums > Jitter

automatic range color detection using sukah to jit.findbounds

June 12, 2007 | 4:49 pm

this will be an easy question
i’m using jit.findbounds for live color tracking
and i’m using sukah to read the color of the image that i want to track however i can’t make a proper way to have an automatic color range that jit.findbounds understand, i look into the tutorials however there is not examples of this issue only manual configuration of the color rage

any help?


June 12, 2007 | 5:08 pm

>i look into the tutorials however there is not examples of this
>issue only manual configuration of the color rage

Look at the help files again – suckah outputs 3 values in RGB format,
and the jit.findbounds object is looking for 4 values [since there’s an
alpha channel in an ARGB video. You’ll need to modify the output of
the suckah so that you’re putting out a list of four floating point values
in the range 0.-1.0, and the first one will be 1.0. It’s basic data scaling
and list packing.

on the floor there’s a long wooden table/on the table there’s an open book/
on the page there’s a detailed drawing/and on the drawing is the name I took
Gregory Taylor http://www.rtqe.net


June 12, 2007 | 7:14 pm

thanks for the response however i think that i didn’t explain well my issue, the maping and packing it’s not my problem, the problem was that if i want to track a color i have to give the max color and the min color atributes to jit.findbounds
and i want it to do that automatically, although i think that its more effective if i first choose using sukah the maximal color then charge that to the atribute max 1. and then to choose the minimal in sukah and then charge that to min. 0.

thanks


June 19, 2007 | 11:06 pm

Do you mean something like that?

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 246 375 36 196617 max;
#P flonum 204 409 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 147 411 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 91 410 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 48 322 210 196617 adjust the ratio between min and max values;
#P flonum 10 320 35 9 1. 10. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 204 373 29 196617 * 1.;
#P newex 147 373 29 196617 * 1.;
#P newex 91 373 29 196617 * 1.;
#P user panel 131 36 46 96;
#X brgb 0 0 255;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 85 36 46 96;
#X brgb 0 255 0;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 40 36 46 96;
#X brgb 255 0 0;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user suckah 33 35 147 102;
#P flonum 173 230 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 103 229 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 33 229 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 173 204 39 196617 / 255.;
#P newex 103 204 39 196617 / 255.;
#P newex 33 205 39 196617 / 255.;
#P newex 33 178 151 196617 unpack 0. 0. 0.;
#P comment 213 180 36 196617 min;
#P fasten 15 0 12 1 15 341 115 341;
#P fasten 15 0 13 1 15 341 171 341;
#P fasten 15 0 14 1 15 341 228 341;
#P connect 7 0 14 0;
#P connect 14 0 19 0;
#P connect 13 0 18 0;
#P connect 6 0 13 0;
#P connect 12 0 17 0;
#P connect 5 0 12 0;
#P connect 8 0 1 0;
#P connect 4 0 7 0;
#P connect 1 2 4 0;
#P connect 3 0 6 0;
#P connect 1 1 3 0;
#P connect 2 0 5 0;
#P connect 1 0 2 0;
#P window clipboard copycount 21;


February 15, 2010 | 9:42 pm

Any idea how to connect the suckah object color detection results to a jit.lcd 2D object?
I have a jit.lcd rectangle i want to move with my hand.
I used jit.findbounds and a suckah choose a desired color to detect.

Please lend me your help if you know!


February 16, 2010 | 9:13 pm

have you looked at the jit.findbounds tutorial? (Tutorial 25: Tracking the Position of a Color in a Movie).

if so, please post your patch showing your attempt to get this working, and you will more than likely get some help.


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