Forums > Jitter

cv.jit.features getting the values of the feature coordinates

October 18, 2006 | 3:08 pm

How can I extract the values of cv.jit.features?
I need to output the locations of the features marked with the red crosses in my display window.


October 18, 2006 | 3:30 pm

I’m not at my computer right now, but I believe I use a combination of
jit.unpack and jit.iter. Again, going it blind with that, but that should
work.

Keith

On 10/18/06, Bart wrote:
>
>
> How can I extract the values of cv.jit.features?
> I need to output the locations of the features marked with the red crosses
> in my display window.
>


October 18, 2006 | 3:52 pm

my days work..
this extract bounds and centroid, sorted. anything else can be added
make sure to apply forth !funky! ball after compiling the js as it responds
to change.

max v2;
#N vpatcher 43 46 813 753;
#P origin 0 4;
#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 587 319 57 9109513 final bang of chain >>;
#P window linecount 3;
#P message 412 461 50 9109513 setprop blobNum $1;
#P window linecount 4;
#P comment 359 505 81 9109513 detect change of number of blobs or placment
and sort list;
#P window linecount 1;
#P newex 79 341 151 9109513 t l l l l;
#P newex 360 374 61 9109513 t l l;
#P newex 412 438 48 9109513 change;
#P newex 411 417 48 9109513 route dim;
#P newex 411 396 60 9109513 jit.matrixinfo;
#P newex 360 418 48 9109513 t b;
#P window linecount 2;
#P message 360 440 50 9109513 setprop changed 1;
#P window linecount 1;
#P newex 360 397 48 9109513 jit.change;
#P toggle 87 69 15 0;
#P comment 104 70 92 9109513 < < forth !funky! ball;
#P comment 467 600 61 9109513 blob count>>;
#P comment 93 243 185 9109513 < < pass to centroid (and sort) then bounds;
#P newex 510 572 59 9109513 print bounds;
#P number 532 599 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 640 331 27 9109513 t b l;
#P newex 657 387 46 9109513 t b l;
#P newex 657 412 101 9109513 pack bounds 0 0 0 0 0;
#P newex 657 364 47 9109513 jit.iter;
#P newex 28 242 61 9109513 t l l l;
#P newex 190 268 106 9109513 cv.jit.blobs.bounds;
#P window linecount 3;
#P comment 463 319 81 9109513 output count before centroid>> and bounds;
#P window linecount 1;
#P comment 233 322 174 9109513 < < remmeber to rize the treshold 50~;
#P newex 559 388 52 9109513 t b l;
#P newex 79 291 106 9109513 t l l;
#P newex 486 392 62 9109513 t b i;
#P newex 486 415 63 9109513 pack sort 1 1;
#P newex 486 551 67 9109513 print centroids;
#P newex 486 528 57 9109513 js router7.js;
#P newex 486 369 62 9109513 jit.iter;
#P newex 544 329 40 9109513 t b l b;
#P newex 559 413 95 9109513 pack centroid 0 0 0 0;
#P newex 559 365 53 9109513 jit.iter;
#P window linecount 2;
#P comment 100 162 108 9109513 Convert to greyscale for labeling.;
#B frgb 255 255 255;
#P comment 103 126 108 9109513 Draw 3 randomly moving balls.;
#B frgb 255 255 255;
#P user jit.cellblock 173 385 357 405 3 9 4 1 45 17 0 1 1 0 0 0 0 0 0 0 0 0
255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0;
#P window linecount 1;
#P newex 28 408 87 9109513 cv.jit.blobs.color;
#P user jit.pwindow 27 432 322 242 0 1 0 0 1 0;
#P newex 28 388 62 9109513 jit.charmap;
#N vpatcher 10 59 480 425;
#P user jit.cellblock 124 232 386 294 139 12 256 1 45 17 0 1 1 0 0 0 1 1 1 0
0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0;
#P outlet 83 245 15 0;
#P inlet 83 44 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 83 92 52 9109513 t l l clear;
#P message 104 161 139 9109513 dstdimend $1 , dstdimstart 1;
#P newex 104 139 53 9109513 route dim;
#P newex 104 117 72 9109513 jit.matrixinfo;
#P newex 83 188 173 9109513 jit.matrix 1 char 256 @usedstdim 1;
#P connect 5 0 4 0;
#P connect 3 0 0 0;
#P connect 4 0 0 0;
#P fasten 4 2 0 0 130 113 198 113 198 182 88 182;
#P connect 0 0 6 0;
#P connect 4 1 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 0 0 7 0;
#P pop;
#P newobj 80 366 85 9109513 p make_charmap;
#N vpatcher 396 397 996 797;
#P inlet 300 76 15 0;
#P window setfont "Sans Serif" 9.;
#N vpatcher 981 353 1145 512;
#P button 81 99 15 0;
#P inlet 83 34 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 59 75 34 9109513 gate 1;
#P inlet 59 34 15 0;
#P outlet 59 99 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P connect 2 0 4 0;
#P connect 3 0 2 1;
#P pop;
#P newobj 299 102 37 9109513 p gater;
#N vpatcher 20 74 733 647;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 149 224 37 9109513 + 200;
#P window linecount 0;
#P newex 331 80 48 9109513 loadbang;
#P newex 55 62 27 9109513 b;
#P inlet 55 27 15 0;
#P outlet 149 505 15 0;
#P message 149 479 111 9109513 paintoval $1 $2 $3 $4;
#P newex 182 431 30 9109513 – 20;
#P newex 149 431 30 9109513 – 20;
#P newex 248 431 31 9109513 + 20;
#P newex 215 431 31 9109513 + 20;
#P newex 149 454 109 9109513 pack 0 0 0 0;
#P newex 149 319 74 9109513 clip 0 300.;
#P newex 234 319 68 9109513 clip 0 220.;
#P newex 72 107 32 9109513 sel 1;
#P newex 72 85 58 9109513 random 20;
#P newex 184 357 31 9109513 float;
#P newex 254 357 31 9109513 float;
#P newex 234 296 27 9109513 + 0.;
#P newex 149 292 27 9109513 + 0.;
#P newex 234 216 64 9109513 random 200;
#P newex 149 198 64 9109513 random 100;
#P newex 454 202 47 9109513 * 6.283;
#P newex 388 202 29 9109513 * 5.;
#P newex 388 224 76 9109513 poltocar;
#P newex 454 182 41 9109513 * 0.01;
#P newex 388 182 41 9109513 * 0.01;
#P newex 454 161 64 9109513 random 100;
#P newex 388 161 64 9109513 random 100;
#P connect 24 0 25 0;
#P connect 25 1 13 0;
#P connect 13 0 14 0;
#P connect 26 0 7 0;
#P connect 7 0 27 0;
#P connect 27 0 9 0;
#P fasten 12 0 9 0 189 378 140 378 140 285 154 285;
#P connect 9 0 16 0;
#P connect 16 0 20 0;
#P connect 20 0 17 0;
#P connect 17 0 22 0;
#P connect 22 0 23 0;
#P fasten 4 0 9 1 393 250 171 250;
#P fasten 15 0 21 0 239 400 187 400;
#P connect 21 0 17 1;
#P fasten 25 0 12 0 60 351 189 351;
#P fasten 16 0 12 1 154 346 210 346;
#P fasten 16 0 18 0 154 412 220 412;
#P connect 18 0 17 2;
#P connect 26 0 8 0;
#P fasten 11 0 10 0 259 377 225 377 225 289 239 289;
#P connect 8 0 10 0;
#P connect 10 0 15 0;
#P fasten 15 0 19 0 239 383 253 383;
#P connect 19 0 17 3;
#P fasten 4 1 10 1 459 258 256 258;
#P fasten 25 0 11 0 60 351 259 351;
#P fasten 15 0 11 1 239 344 280 344;
#P fasten 14 0 0 0 77 131 393 131;
#P connect 26 0 0 0;
#P connect 0 0 2 0;
#P connect 2 0 5 0;
#P connect 5 0 4 0;
#P connect 26 0 1 0;
#P fasten 14 0 1 0 77 131 459 131;
#P connect 1 0 3 0;
#P connect 3 0 6 0;
#P connect 6 0 4 1;
#P pop;
#P newobj 299 125 72 9109513 p moving_ball;
#P newex 60 168 111 9109513 jit.lcd 4 char 320 240;
#P newex 317 30 48 9109513 loadbang;
#P message 317 52 146 9109513 brgb 0 0 0 , frgb 255 255 255;
#N vpatcher 20 74 733 647;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 149 224 37 9109513 + 200;
#P window linecount 0;
#P newex 331 80 48 9109513 loadbang;
#P newex 55 62 27 9109513 b;
#P inlet 55 27 15 0;
#P outlet 149 505 15 0;
#P message 149 479 111 9109513 paintoval $1 $2 $3 $4;
#P newex 182 431 30 9109513 – 20;
#P newex 149 431 30 9109513 – 20;
#P newex 248 431 31 9109513 + 20;
#P newex 215 431 31 9109513 + 20;
#P newex 149 454 109 9109513 pack 0 0 0 0;
#P newex 149 319 74 9109513 clip 220. 300.;
#P newex 234 319 68 9109513 clip 20. 220.;
#P newex 72 107 32 9109513 sel 1;
#P newex 72 85 58 9109513 random 20;
#P newex 184 357 31 9109513 float;
#P newex 254 357 31 9109513 float;
#P newex 234 296 27 9109513 + 0.;
#P newex 149 292 27 9109513 + 0.;
#P newex 234 216 64 9109513 random 200;
#P newex 149 198 64 9109513 random 100;
#P newex 454 202 47 9109513 * 6.283;
#P newex 388 202 29 9109513 * 5.;
#P newex 388 224 76 9109513 poltocar;
#P newex 454 182 41 9109513 * 0.01;
#P newex 388 182 41 9109513 * 0.01;
#P newex 454 161 64 9109513 random 100;
#P newex 388 161 64 9109513 random 100;
#P connect 24 0 25 0;
#P connect 25 1 13 0;
#P connect 13 0 14 0;
#P connect 26 0 7 0;
#P connect 7 0 27 0;
#P fasten 12 0 9 0 189 378 140 378 140 285 154 285;
#P connect 27 0 9 0;
#P connect 9 0 16 0;
#P connect 16 0 20 0;
#P connect 20 0 17 0;
#P connect 17 0 22 0;
#P connect 22 0 23 0;
#P fasten 4 0 9 1 393 250 171 250;
#P fasten 15 0 21 0 239 400 187 400;
#P connect 21 0 17 1;
#P fasten 25 0 12 0 60 351 189 351;
#P fasten 16 0 12 1 154 346 210 346;
#P fasten 16 0 18 0 154 412 220 412;
#P connect 18 0 17 2;
#P connect 26 0 8 0;
#P connect 8 0 10 0;
#P fasten 11 0 10 0 259 377 225 377 225 289 239 289;
#P connect 10 0 15 0;
#P fasten 15 0 19 0 239 383 253 383;
#P connect 19 0 17 3;
#P fasten 4 1 10 1 459 258 256 258;
#P fasten 25 0 11 0 60 351 259 351;
#P fasten 15 0 11 1 239 344 280 344;
#P fasten 14 0 0 0 77 131 393 131;
#P connect 26 0 0 0;
#P connect 0 0 2 0;
#P connect 2 0 5 0;
#P connect 5 0 4 0;
#P fasten 14 0 1 0 77 131 459 131;
#P connect 26 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 6 0;
#P connect 6 0 4 1;
#P pop;
#P newobj 224 104 72 9109513 p moving_ball;
#N vpatcher 20 74 733 647;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 149 227 37 9109513 + 100;
#P window linecount 0;
#P newex 331 80 48 9109513 loadbang;
#P newex 55 62 27 9109513 b;
#P inlet 55 27 15 0;
#P outlet 149 505 15 0;
#P message 149 479 111 9109513 paintoval $1 $2 $3 $4;
#P newex 182 431 30 9109513 – 20;
#P newex 149 431 30 9109513 – 20;
#P newex 248 431 31 9109513 + 20;
#P newex 215 431 31 9109513 + 20;
#P newex 149 454 109 9109513 pack 0 0 0 0;
#P newex 149 319 74 9109513 clip 120. 179.;
#P newex 234 319 68 9109513 clip 20. 220.;
#P newex 72 107 32 9109513 sel 1;
#P newex 72 85 58 9109513 random 20;
#P newex 184 357 31 9109513 float;
#P newex 254 357 31 9109513 float;
#P newex 234 296 27 9109513 + 0.;
#P newex 149 292 27 9109513 + 0.;
#P newex 234 216 64 9109513 random 200;
#P newex 149 202 64 9109513 random 100;
#P newex 454 202 47 9109513 * 6.283;
#P newex 388 202 29 9109513 * 5.;
#P newex 388 224 76 9109513 poltocar;
#P newex 454 182 41 9109513 * 0.01;
#P newex 388 182 41 9109513 * 0.01;
#P newex 454 161 64 9109513 random 100;
#P newex 388 161 64 9109513 random 100;
#P connect 24 0 25 0;
#P connect 25 1 13 0;
#P connect 13 0 14 0;
#P connect 26 0 7 0;
#P connect 7 0 27 0;
#P fasten 12 0 9 0 189 378 140 378 140 285 154 285;
#P connect 27 0 9 0;
#P connect 9 0 16 0;
#P connect 16 0 20 0;
#P connect 20 0 17 0;
#P connect 17 0 22 0;
#P connect 22 0 23 0;
#P fasten 4 0 9 1 393 250 171 250;
#P fasten 15 0 21 0 239 400 187 400;
#P connect 21 0 17 1;
#P fasten 25 0 12 0 60 351 189 351;
#P fasten 16 0 12 1 154 346 210 346;
#P fasten 16 0 18 0 154 412 220 412;
#P connect 18 0 17 2;
#P connect 26 0 8 0;
#P fasten 11 0 10 0 259 377 225 377 225 289 239 289;
#P connect 8 0 10 0;
#P connect 10 0 15 0;
#P fasten 15 0 19 0 239 383 253 383;
#P connect 19 0 17 3;
#P fasten 4 1 10 1 459 258 256 258;
#P fasten 25 0 11 0 60 351 259 351;
#P fasten 15 0 11 1 239 344 280 344;
#P fasten 14 0 0 0 77 131 393 131;
#P connect 26 0 0 0;
#P connect 0 0 2 0;
#P connect 2 0 5 0;
#P connect 5 0 4 0;
#P fasten 14 0 1 0 77 131 459 131;
#P connect 26 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 6 0;
#P connect 6 0 4 1;
#P pop;
#P newobj 148 104 72 9109513 p moving_ball;
#P newex 50 71 56 9109513 t b b clear;
#N vpatcher 20 74 733 647;
#P window setfont "Sans Serif" 9.;
#P newex 331 80 48 9109513 loadbang;
#P newex 55 62 27 9109513 b;
#P inlet 55 27 15 0;
#P outlet 149 505 15 0;
#P message 149 479 111 9109513 paintoval $1 $2 $3 $4;
#P newex 182 431 30 9109513 – 20;
#P newex 149 431 30 9109513 – 20;
#P newex 248 431 31 9109513 + 20;
#P newex 215 431 31 9109513 + 20;
#P newex 149 454 109 9109513 pack 0 0 0 0;
#P newex 149 319 62 9109513 clip 20. 79.;
#P newex 234 319 68 9109513 clip 20. 220.;
#P newex 72 107 32 9109513 sel 1;
#P newex 72 85 58 9109513 random 20;
#P newex 184 357 31 9109513 float;
#P newex 254 357 31 9109513 float;
#P newex 234 296 27 9109513 + 0.;
#P newex 149 292 27 9109513 + 0.;
#P newex 234 216 64 9109513 random 200;
#P newex 149 216 64 9109513 random 100;
#P newex 454 202 47 9109513 * 6.283;
#P newex 388 202 29 9109513 * 5.;
#P newex 388 224 76 9109513 poltocar;
#P newex 454 182 41 9109513 * 0.01;
#P newex 388 182 41 9109513 * 0.01;
#P newex 454 161 64 9109513 random 100;
#P newex 388 161 64 9109513 random 100;
#P connect 24 0 25 0;
#P connect 25 1 13 0;
#P connect 13 0 14 0;
#P connect 26 0 7 0;
#P fasten 12 0 9 0 189 378 140 378 140 285 154 285;
#P connect 7 0 9 0;
#P connect 9 0 16 0;
#P connect 16 0 20 0;
#P connect 20 0 17 0;
#P connect 17 0 22 0;
#P connect 22 0 23 0;
#P fasten 4 0 9 1 393 250 171 250;
#P fasten 15 0 21 0 239 400 187 400;
#P connect 21 0 17 1;
#P fasten 25 0 12 0 60 351 189 351;
#P fasten 16 0 12 1 154 346 210 346;
#P fasten 16 0 18 0 154 412 220 412;
#P connect 18 0 17 2;
#P connect 26 0 8 0;
#P connect 8 0 10 0;
#P fasten 11 0 10 0 259 377 225 377 225 289 239 289;
#P connect 10 0 15 0;
#P fasten 15 0 19 0 239 383 253 383;
#P connect 19 0 17 3;
#P fasten 4 1 10 1 459 258 256 258;
#P fasten 25 0 11 0 60 351 259 351;
#P fasten 15 0 11 1 239 344 280 344;
#P fasten 14 0 0 0 77 131 393 131;
#P connect 26 0 0 0;
#P connect 0 0 2 0;
#P connect 2 0 5 0;
#P connect 5 0 4 0;
#P fasten 14 0 1 0 77 131 459 131;
#P connect 26 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 6 0;
#P connect 6 0 4 1;
#P pop;
#P newobj 73 104 72 9109513 p moving_ball;
#P newex 50 50 52 9109513 metro 33;
#P inlet 50 30 15 0;
#P outlet 60 244 15 0;
#P connect 1 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 9 0;
#P connect 3 0 9 0;
#P connect 5 0 9 0;
#P connect 6 0 9 0;
#P fasten 7 0 9 0 322 148 65 148;
#P connect 4 2 9 0;
#P connect 10 0 9 0;
#P connect 9 0 0 0;
#P connect 4 1 3 0;
#P fasten 4 1 5 0 78 97 153 97;
#P fasten 4 1 6 0 78 97 229 97;
#P connect 12 0 11 0;
#P connect 11 0 10 0;
#P connect 8 0 7 0;
#P fasten 4 1 11 1 78 97 331 97;
#P pop;
#P newobj 28 131 69 9109513 p three_balls;
#P newex 79 319 151 9109513 cv.jit.blobs.sort @threshold 20;
#P newex 78 268 106 9109513 cv.jit.blobs.centroids;
#P newex 28 220 122 9109513 cv.jit.label @charmode 1;
#P newex 28 162 66 9109513 jit.rgb2luma;
#P toggle 28 104 15 0;
#P window linecount 2;
#P comment 150 478 102 9109513 Labeling must be done with char output.;
#P window linecount 1;
#P comment 49 105 135 9109513 Turn on animation;
#B frgb 255 255 255;
#P window setfont "Sans Serif" 24.;
#P comment 14 19 684 9109528 cv.jit.blobs.sort: re-order labels for
continuity;
#B frgb 14 51 69;
#P user panel 14 91 214 118;
#X brgb 111 127 126;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 14 48 600 4;
#X brgb 182 192 184;
#X frgb 198 198 198;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 14 47 600 5;
#X brgb 149 55 55;
#X frgb 149 55 55;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 17 94 216 119;
#X brgb 182 192 184;
#X frgb 198 198 198;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 9.;
#P hidden newex 176 578 106 9109513 bgcolor 210 210 195;
#P window linecount 5;
#P comment 129 466 113 9109513 You MUST label the image with "charmode" set
to 1 and calculate moments before processing!;
#P window linecount 1;
#P comment 196 368 100 9109513 Re-ordered labels.;
#P comment 186 293 139 9109513 < < first pass to sort then to iter;
#P user panel 103 67 92 21;
#X brgb 119 203 61;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 359 370 119 199;
#X brgb 176 138 166;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 13 0 18 0;
#P connect 18 0 14 0;
#P connect 14 0 15 0;
#P connect 15 0 39 0;
#P connect 39 0 20 0;
#P connect 20 0 22 0;
#P connect 22 0 21 0;
#P connect 39 2 16 0;
#P connect 16 0 34 0;
#P connect 34 1 17 0;
#P connect 17 0 57 0;
#P connect 57 3 19 0;
#P connect 19 0 20 1;
#P connect 49 0 18 1;
#P connect 57 2 23 0;
#P fasten 39 1 38 0 58 263 195 263;
#P fasten 57 1 56 0 131 364 365 364;
#P connect 56 0 50 0;
#P connect 55 0 52 0;
#P connect 50 0 52 0;
#P connect 52 0 51 0;
#P connect 56 1 53 0;
#P connect 53 0 54 0;
#P connect 54 0 55 0;
#P connect 55 0 59 0;
#P fasten 57 0 29 0 84 364 491 364;
#P connect 29 0 33 0;
#P connect 33 0 32 0;
#P fasten 51 0 30 0 365 504 491 504;
#P fasten 27 0 30 0 564 458 491 458;
#P connect 32 0 30 0;
#P fasten 41 0 30 0 662 458 491 458;
#P connect 59 0 30 0;
#P fasten 28 0 30 0 549 448 491 448;
#P connect 30 0 31 0;
#P connect 30 1 45 0;
#P connect 29 1 32 1;
#P connect 30 2 44 0;
#P connect 33 1 32 2;
#P fasten 34 0 28 0 84 316 549 316;
#P connect 28 1 26 0;
#P connect 26 0 35 0;
#P connect 35 0 27 0;
#P connect 26 1 27 1;
#P connect 35 1 27 2;
#P fasten 38 0 43 0 195 289 645 289;
#P connect 43 1 40 0;
#P connect 40 0 42 0;
#P connect 42 0 41 0;
#P connect 40 1 41 1;
#P connect 42 1 41 2;
#P pop;

\save as router7.js\
autowatch=1;
outlets=3;
post("n__compiled__nnnnnnnnnnnn");
//store sorted labels and output
var cvBlobsCentroids=new Array();
var cvBlobsBounds=new Array();
var cvSort=new Array();
var outOrder=new Array();
var changed=1;
var blobNum=0;
//
function centroid(){
var a = arrayfromargs(arguments);
//the first memeber of the cvBlobsCentroids array is
//only so you see that it is sorted, you should delete it, same for bounds
cvBlobsCentroids[cvSort[a[0]]]=[a[0],a[1],a[2],a[3]];
}
//
function bounds(){
var z = arrayfromargs(arguments);
cvBlobsBounds[cvSort[z[0]]]=[z[0],z[1],z[2],z[3],z[4]];
}
//recive packed and swaped sort to label matrix iteration
function sort()
{ //create an funbuff array
var v = arrayfromargs(arguments);
cvSort.length=blobNum;
outOrder.length=blobNum;
cvSort[v[0]]=v[1];
}

function bang(){
outlet(2,blobNum);
if(changed)
{//only sort on jit.change or cvSort.length change,
//copy cv.blob.Sort array and numricly sort it.
outOrder=cvSort.join();
outOrder=outOrder.split(",");
outOrder.sort()
changed=0;
}
for(i=0;i
outlet(0,cvBlobsCentroids[outOrder[i]]);
outlet(1,cvBlobsBounds[outOrder[i]]);
}
}

2006/10/18, keith manlove :
>
> I’m not at my computer right now, but I believe I use a combination of
> jit.unpack and jit.iter. Again, going it blind with that, but that should
> work.
>
> Keith
>
>
> On 10/18/06, Bart wrote:
> >
> >
> > How can I extract the values of cv.jit.features?
> > I need to output the locations of the features marked with the red
> > crosses in my display window.
> >
>
>
>
>
>


October 18, 2006 | 4:24 pm

Thanks for your replies. I’m just a noob here. Your patch will take me days to understand Yair :)

I am able to extract the coordinates of jit.features now thanks to you Keith.

Let’s say I want to save the coordinates of all the feature points of one object once (feature point 1 to the last one taken from a still image?) Later I want to compare the feature points of a new object in my camera view to the saved ones.

What do I need to do this? Do I need to save them in a matrix or something like jit.cellblocks?

What I would like is a match when for instance 80% of the points match the saved ones (with a margin because they never will be exact due to the live input).


October 18, 2006 | 4:40 pm

far from being my patch, this is a modded cv.blobs.sort help file. it will
take me a few more years to make something this useful ;)

as for detecting a change in a matrix… a simple way is to run jit.3m and
watch the mean value of the matrix, i guess (and could be wrong) it could
work but i am not sure. a matrix is a matrix.
remember that comparing 2 pictures is a very complicated things, a tiny
change in the angle, lighting,optics,etc gives totally different results.
check other cv objects. like moments or recon
2006/10/18, Bart :
>
>
> Thanks for your replies. I’m just a noob here. Your patch will take me
> days to understand Yair :)
>
> I am able to extract the coordinates of jit.features now thanks to you
> Keith.
>
> Let’s say I want to save the coordinates of all the feature points of one
> object once (feature point 1 to the last one taken from a still image?)
> Later I want to compare the feature points of a new object in my camera view
> to the saved ones.
>
> What do I need to do this? Do I need to save them in a matrix or something
> like jit.cellblocks?
>
> What I would like is a match when for instance 80% of the points match the
> saved ones (with a margin because they never will be exact due to the live
> input).
>


November 7, 2006 | 2:39 pm

Are there any demo or example patches that use cv.jit.blobs.recon besids the one in the tutorial?

The tutorial example uses character recognition which makes it hard for me to understand how to use this object in a different way..for instance just recognizing a particular pattern on a single blob.


November 7, 2006 | 4:39 pm

i havnt tried the recon objects. you my have better luck with outside
(opensourced) solutions like arttoolkit or reactables.
the first offer full 6dof output of its trackers, the second offer udp
output for integration into max.

http://mtd.fh-hagenberg.at/depot/graphics/artoolkit/index.html

http://ichim05.ichim.org/jahia/Jahia/lang/de/pid/547

On 11/7/06, Bart wrote:
>
>
> Are there any demo or example patches that use cv.jit.blobs.recon besids
> the one in the tutorial?
>
> The tutorial example uses character recognition which makes it hard for me
> to understand how to use this object in a different way..for instance just
> recognizing a particular pattern on a single blob.
>


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