Trying to track a colour with cv.jit.track


    Apr 15 2007 | 1:52 pm
    Im trying to track a red object using cv.jit.track but I'm having trouble converting the matrix data into a format that the object cv.jit.track understands. Is there a way of converting hsl to luma or am I barking up the wrong tree?
    max v2;
    Thanks

    • Apr 15 2007 | 2:37 pm
      you are barking at the wrong thread, run a search on "hsl'' and you will
      find much
      On 4/15/07, Rhys Perkins wrote:
      >
      >
      > Im trying to track a red object using cv.jit.track but I'm having trouble
      > converting the matrix data into a format that the object cv.jit.trackunderstands. Is there a way of converting hsl to luma or am I barking up
      > the wrong tree?
      >
      > max v2;
      > #N vpatcher 13 44 1283 800;
      > #P origin 3 0;
      > #P window setfont "Sans Serif" 18.;
      > #P window linecount 1;
      > #P comment 167 430 18 196626 3;
      > #P comment 128 429 35 196626 OR;
      > #P comment 99 428 18 196626 3;
      > #P comment 151 150 18 196626 2;
      > #P comment 80 122 18 196626 1;
      > #P toggle 165 459 15 0;
      > #P window setfont "Sans Serif" 9.;
      > #P newex 165 487 29 196617 gate;
      > #P toggle 96 460 15 0;
      > #P newex 96 489 29 196617 gate;
      > #P newex 11 427 66 196617 jit.rgb2luma;
      > #P number 42 504 35 9 1 7 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P message 42 525 51 196617 radius $1;
      > #P comment 847 737 73 196617 Starting point.;
      > #P number 814 341 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 777 341 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 777 312 47 196617 unpack;
      > #P message 704 312 62 196617 set 0 $1 $2;
      > #P newex 704 285 63 196617 route mouse;
      > #P user panel 769 332 158 35;
      > #X brgb 210 210 195;
      > #X frgb 140 140 140;
      > #X border 1;
      > #X rounded 0;
      > #X shadow 0;
      > #X done;
      > #P newex 96 617 88 196617 cv.jit.track.draw;
      > #P user jit.pwindow 383 33 322 242 0 1 0 0 1 0;
      > #P newex 96 578 120 196617 cv.jit.track @npoints 1;
      > #P comment 189 258 100 196617 Hue range.;
      > #P number 300 276 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 189 276 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P number 417 315 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 318 341 109 196617 jit.op @op > @val 100;
      > #P newex 96 371 65 196617 jit.op @op *;
      > #P newex 96 338 115 196617 jit.op @op +;
      > #P newex 201 315 109 196617 jit.op @op > @val 200;
      > #P newex 96 315 103 196617 jit.op @op < @val 20;
      > #P newex 82 281 66 196617 jit.unpack;
      > #P newex 82 252 58 196617 jit.rgb2hsl;
      > #P user jit.pwindow 858 425 322 242 0 1 0 0 1 0;
      > #P message 213 178 46 196617 settings;
      > #P message 178 178 33 196617 close;
      > #P message 146 178 30 196617 open;
      > #P toggle 82 154 15 0;
      > #P newex 82 204 195 196617 jit.qt.grab 320 240 @vmode 2 @unique 1;
      > #P newex 82 178 46 196617 metro 2;
      > #P window linecount 3;
      > #P comment 415 275 100 196617 Saturation threshold. Anything lower is
      > rejected.;
      > #P comment 207 446 158 196617 How do I convert the data coming from jit.opinto a format that
      > civ.jit.track understands?;
      > #P window linecount 9;
      > #P comment 369 413 94 196617 It doesnt understand the hsl but does
      > understand the luma. Is there a way of converting the hsl data from jit.opto luma so that the red hue can be tracked?;
      > #P window setfont "Sans Serif" 18.;
      > #P window linecount 2;
      > #P comment 57 44 255 196626 Trying to track RED objects using cv.jit.track
      > ;
      > #P fasten 5 0 34 0 87 236 16 236;
      > #P connect 33 0 32 0;
      > #P connect 6 0 4 0;
      > #P connect 4 0 5 0;
      > #P fasten 7 0 5 0 151 200 87 200;
      > #P fasten 8 0 5 0 183 200 87 200;
      > #P fasten 9 0 5 0 218 200 87 200;
      > #P connect 5 0 11 0;
      > #P connect 11 0 12 0;
      > #P connect 12 1 13 0;
      > #P connect 13 0 15 0;
      > #P connect 15 0 16 0;
      > #P connect 36 0 35 0;
      > #P fasten 37 0 22 0 170 553 101 553;
      > #P fasten 27 0 22 0 709 536 101 536;
      > #P fasten 32 0 22 0 47 551 101 551;
      > #P connect 35 0 22 0;
      > #P connect 22 0 24 0;
      > #P fasten 34 0 35 1 16 452 120 452;
      > #P fasten 17 0 16 1 323 371 156 371;
      > #P connect 38 0 37 0;
      > #P fasten 35 0 24 1 101 518 229 518 229 613 179 613;
      > #P fasten 37 0 24 1 170 509 234 509 234 606 179 606;
      > #P fasten 16 0 37 1 101 422 189 422;
      > #P connect 19 0 13 1;
      > #P fasten 12 1 14 0 101 307 206 307;
      > #P connect 14 0 15 1;
      > #P connect 20 0 14 1;
      > #P fasten 12 2 17 0 115 302 323 302;
      > #P fasten 24 0 23 0 101 664 855 664 855 25 389 25;
      > #P connect 18 0 17 1;
      > #P connect 23 1 26 0;
      > #P connect 26 0 27 0;
      > #P fasten 26 0 28 0 709 307 782 307;
      > #P connect 28 0 29 0;
      > #P connect 28 1 30 0;
      > #P fasten 16 0 10 0 101 393 864 393;
      > #P pop;
      >
      > Thanks
      >