aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pix_opencv_blobtrack-help.pd115
-rw-r--r--pix_opencv_contours-help.pd90
-rw-r--r--pix_opencv_warpperspective-help.pd35
3 files changed, 159 insertions, 81 deletions
diff --git a/pix_opencv_blobtrack-help.pd b/pix_opencv_blobtrack-help.pd
index 24ceefe..e26fd2a 100644
--- a/pix_opencv_blobtrack-help.pd
+++ b/pix_opencv_blobtrack-help.pd
@@ -1,4 +1,4 @@
-#N canvas 1006 403 818 513 10;
+#N canvas 994 439 818 513 10;
#X obj 7 200 cnv 15 430 300 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 7 156 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577
@@ -15,7 +15,7 @@
This is made by a foreground detector \, a blob detector \, a blob
tracker and a trajectory post processor.;
#X text 30 173 none;
-#X obj 450 216 cnv 15 250 120 empty empty empty 20 12 0 14 -4034 -66577
+#X obj 446 222 cnv 15 250 120 empty empty empty 20 12 0 14 -4034 -66577
0;
#X obj 656 363 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577
0;
@@ -48,11 +48,8 @@ tracker and a trajectory post processor.;
#X text 657 362 Create window:;
#X obj 454 364 pix_texture;
#X obj 454 30 gemhead;
-#X msg 520 45 auto 1;
-#X obj 520 18 loadbang;
-#X obj 606 295 print dumpout;
-#X floatatom 501 293 5 0 0 0 - - -;
-#N canvas 1072 385 709 722 showblob 0;
+#X floatatom 531 323 5 0 0 0 blob_num - -;
+#N canvas 1068 357 709 722 showblob 0;
#X obj 187 13 inlet blobinformation;
#X obj 279 316 gemlist;
#X obj 279 296 t b a;
@@ -89,7 +86,7 @@ tracker and a trajectory post processor.;
#X obj 279 596 translateXYZ 0.2 0.2 0;
#X text 336 194 here is an example on how to display blobs with Gem
;
-#X obj 279 446 scaleXYZ 10.666 8 0;
+#X obj 279 446 scaleXYZ 10.666 -8 0;
#X connect 0 0 6 1;
#X connect 1 0 20 0;
#X connect 2 0 1 0;
@@ -135,15 +132,14 @@ tracker and a trajectory post processor.;
#X connect 32 0 19 1;
#X connect 33 0 23 0;
#X connect 35 0 12 0;
-#X restore 553 315 pd showblob;
-#X obj 454 395 rectangle 5.333 4;
+#X restore 568 320 pd showblob;
#X obj 454 124 pix_resize 320 240;
#X obj 454 255 pix_opencv_blobtrack;
#X obj 454 173 pix_rgba;
#X obj 471 227 r \$0-properties;
#X text 464 153 input format : rgba or grey;
-#N canvas 695 197 544 482 properties 0;
-#X msg 290 314 monitorStage \$1;
+#N canvas 681 239 713 583 properties 0;
+#X msg 99 407 monitorStage \$1;
#X msg 4 21 getModule;
#X msg 4 41 getModule fg;
#X msg 4 61 getModule bd;
@@ -153,21 +149,28 @@ tracker and a trajectory post processor.;
#X msg 260 194 setModule bd BD_CC;
#X msg 27 194 setModule fg FG_0S;
#X msg 147 194 setModule fg FG_1;
-#X text 289 249 monitoring stage :;
-#X obj 290 266 vradio 15 1 0 3 empty empty empty 0 -8 0 10 -262144
--1 -1 0;
-#X text 308 265 input image;
-#X text 307 281 foreground mask;
-#X text 307 296 diplsay blobs;
-#X obj -35 433 s \$0-properties;
+#X text 98 342 monitoring stage :;
+#X obj 99 359 vradio 15 1 0 3 empty empty empty 0 -8 0 10 -262144 -1
+-1 0;
+#X text 117 358 input image;
+#X text 116 374 foreground mask;
+#X text 116 389 diplsay blobs;
+#X obj -35 513 s \$0-properties;
#X obj -35 353 t a;
-#X msg 287 380 fgTrainFrames \$1;
-#X floatatom 287 353 5 0 0 0 - - -;
+#X msg -14 405 fgTrainFrames \$1;
+#X floatatom -14 378 5 0 0 0 - - -;
#X text 72 20 post all accessibles modules and their nickname;
#X text 108 56 post information of specific module and get the avaiblable
variant to load;
#X msg 12 160 setModule fg FG_1 \, setModule bd BD_Simple \, setModule
bt CC \, setModule btpp none \, setModule bta none;
+#X msg 201 249 getParam fg;
+#X floatatom 201 277 5 0 0 0 - - -;
+#X msg 201 295 setParam fg NG \$1;
+#X text 279 242 getParam <module name> : returns all parameters for
+a given module;
+#X text 319 295 setParam <module name> <param name> <value> : set a
+module parameter \, value could be float or symbol;
#X connect 0 0 15 0;
#X connect 1 0 16 0;
#X connect 2 0 16 0;
@@ -183,7 +186,10 @@ bt CC \, setModule btpp none \, setModule bta none;
#X connect 17 0 15 0;
#X connect 18 0 17 0;
#X connect 21 0 16 0;
-#X restore 610 222 pd properties;
+#X connect 22 0 16 0;
+#X connect 23 0 24 0;
+#X connect 24 0 16 0;
+#X restore 595 230 pd properties;
#X obj 454 70 pix_film;
#X text 459 96 the bigger the image is \, the more CPU expensive the
algo will be;
@@ -194,10 +200,9 @@ usefull ones \, see [pd properties] for details.;
#X text 26 272 monitoringStage : set the location where output image
is taken (input \, foreground mask or input with tracking information)
;
-#X obj 580 51 openpanel;
-#X obj 583 24 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+#X obj 550 50 openpanel;
+#X obj 550 32 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
-#X msg 580 72 open \$1;
#X text 15 321 Outlet 1 : gemstate;
#X text 15 341 Outlet 2 :;
#X text 35 360 blobnum : number of blobs in the current frame;
@@ -207,22 +212,48 @@ is taken (input \, foreground mask or input with tracking information)
and algorithms... check out the pd-properties;
#X text 65 399 and for each blob : ID \, x \, y \, width \, height
\, state (valid or not);
-#X obj 501 274 route blobnum cvblob;
+#X msg 550 70 open \$1 \, auto 1;
+#X obj 454 395 rectangle 5.333 4;
+#X msg 509 70 0;
+#X msg 531 302 \$1;
+#X obj 531 281 route cvblob;
+#N canvas 1 92 593 300 info 0;
+#X obj 153 40 inlet;
+#X obj 153 62 route modulelist param;
+#X msg 55 148 fg bd bt btpp bta;
+#X obj 55 106 list prepend set;
+#X obj 55 128 list trim;
+#X msg 78 211 getModule;
+#X obj 78 236 s \$0-properties;
+#X text -59 148 available module :;
+#X msg 146 212 getParam fg;
+#X obj 217 108 print param;
+#X obj 298 96 print dumpout;
+#X connect 0 0 1 0;
+#X connect 1 0 3 0;
+#X connect 1 1 9 0;
+#X connect 1 2 10 0;
+#X connect 3 0 4 0;
+#X connect 4 0 2 0;
+#X connect 5 0 6 0;
+#X connect 8 0 6 0;
+#X restore 645 322 pd info;
#X connect 12 0 13 0;
#X connect 13 0 12 0;
-#X connect 15 0 22 0;
-#X connect 16 0 29 0;
-#X connect 17 0 29 0;
-#X connect 18 0 17 0;
-#X connect 23 0 25 0;
-#X connect 24 0 15 0;
-#X connect 24 1 45 0;
-#X connect 25 0 24 0;
-#X connect 26 0 24 0;
-#X connect 29 0 23 0;
-#X connect 35 0 37 0;
-#X connect 36 0 35 0;
-#X connect 37 0 29 0;
-#X connect 45 0 20 0;
-#X connect 45 1 21 0;
-#X connect 45 2 19 0;
+#X connect 15 0 41 0;
+#X connect 16 0 25 0;
+#X connect 19 0 21 0;
+#X connect 20 0 15 0;
+#X connect 20 1 44 0;
+#X connect 21 0 20 0;
+#X connect 22 0 20 0;
+#X connect 25 0 19 0;
+#X connect 25 2 42 0;
+#X connect 31 0 40 0;
+#X connect 32 0 31 0;
+#X connect 40 0 25 0;
+#X connect 42 0 25 1;
+#X connect 43 0 17 0;
+#X connect 44 0 43 0;
+#X connect 44 0 18 0;
+#X connect 44 1 45 0;
diff --git a/pix_opencv_contours-help.pd b/pix_opencv_contours-help.pd
index f36b4b6..ec67f1e 100644
--- a/pix_opencv_contours-help.pd
+++ b/pix_opencv_contours-help.pd
@@ -1,4 +1,4 @@
-#N canvas 716 180 794 766 10;
+#N canvas 950 118 794 766 10;
#X obj 472 35 cnv 15 300 500 empty empty empty 20 12 0 14 -228992 -66577
0;
#X obj 11 56 cnv 15 450 200 empty empty empty 20 12 0 14 -233017 -66577
@@ -86,7 +86,7 @@ point (2 floats)> <depth point (2 floats)> depth;
#X floatatom 617 197 5 0 0 0 - - -;
#X msg 659 142 10;
#X msg 625 141 2;
-#N canvas 1175 234 474 845 draw_rotrect 0;
+#N canvas 1171 234 474 845 draw_rotrect 0;
#X obj 71 506 GEMglVertex2d;
#X obj 71 586 GEMglVertex2d;
#X obj 71 666 GEMglVertex2d;
@@ -171,8 +171,7 @@ point (2 floats)> <depth point (2 floats)> depth;
#X connect 35 0 26 0;
#X restore 658 323 pd draw_rotrect;
#X obj 487 240 pix_opencv_contours;
-#X obj 514 96 pix_image examples/dessin.tif;
-#N canvas 965 307 674 695 drawdefects 0;
+#N canvas 963 313 674 695 drawdefects 0;
#X obj 191 301 gemhead;
#X obj 134 217 loadbang;
#X msg 134 238 0;
@@ -185,7 +184,7 @@ point (2 floats)> <depth point (2 floats)> depth;
#X obj 244 139 list split 7;
#X obj 191 335 color 1 0 0 1;
#X obj 191 355 translateXYZ -5.3333 4 0;
-#N canvas 897 569 739 379 ortho_point 0;
+#N canvas 895 575 739 379 ortho_point 0;
#X obj 192 7 inlet;
#X obj 192 57 t a a;
#X obj 204 238 *;
@@ -261,11 +260,11 @@ point (2 floats)> <depth point (2 floats)> depth;
#X connect 19 0 15 0;
#X connect 19 0 14 0;
#X restore 542 294 pd drawdefects;
-#N canvas 248 889 1126 281 options 0;
+#N canvas 791 386 1126 291 options 0;
#X obj 57 147 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X msg 57 167 contours \$1;
-#X obj 57 215 outlet;
+#X obj 57 251 outlet;
#X obj 147 147 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 247 147 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0
@@ -296,7 +295,7 @@ of list output;
ou set table);
#X text 569 256 see [pd draw_contour_gemvertexbuffer] for an example
of drawing contours;
-#N canvas 856 347 596 300 draw_contour_gemvertexbuffer 0;
+#N canvas 793 182 596 300 draw_contour_gemvertexbuffer 0;
#X obj 175 173 loadbang;
#X obj 135 65 translateXYZ -0.5 -0.5 0;
#X obj 135 42 scaleXYZ 10.6666 -8 1;
@@ -308,19 +307,29 @@ of drawing contours;
#X msg 175 193 draw line;
#X obj 135 245 gemvertexbuffer;
#X obj 161 108 inlet;
+#X obj 269 174 r point_number;
+#X msg 269 201 resize \$1;
+#X floatatom 342 206 5 0 0 0 - - -;
#X connect 0 0 7 0;
#X connect 1 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 8 0;
+#X connect 3 1 6 0;
#X connect 4 0 5 0;
#X connect 5 0 2 0;
#X connect 6 0 8 0;
#X connect 7 0 8 0;
#X connect 9 0 6 0;
+#X connect 10 0 11 0;
+#X connect 10 0 12 0;
+#X connect 11 0 8 0;
#X restore 797 147 pd draw_contour_gemvertexbuffer;
#X obj 797 126 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X text 813 127 draw with gemvertexbuffer;
+#X msg 379 80 repeat_point \$1;
+#X floatatom 379 62 5 0 0 0 - - -;
+#X text 348 47 repeat the first point n times;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 3 0 5 0;
@@ -333,6 +342,8 @@ of drawing contours;
#X connect 16 0 17 0;
#X connect 17 0 2 0;
#X connect 24 0 23 0;
+#X connect 26 0 2 0;
+#X connect 27 0 26 0;
#X restore 674 213 pd options;
#X text 489 347 color legend :;
#X text 522 364 yellow = bounding box;
@@ -340,7 +351,7 @@ of drawing contours;
#X text 534 385 blue = convexhull;
#X text 534 397 pink = convexhull edge with defects;
#X text 540 409 red = farthest point from convexhull;
-#N canvas 1 110 632 734 draw_contours 0;
+#N canvas 1 128 632 734 draw_contours 0;
#X obj 178 132 list split 2;
#X obj 170 593 GEMglEnd;
#X obj 300 590 GEMglVertex2d;
@@ -431,7 +442,7 @@ of drawing contours;
#X connect 35 1 30 1;
#X connect 36 0 23 0;
#X restore 486 320 pd draw_contours;
-#N canvas 666 308 660 668 info 0;
+#N canvas 231 255 816 668 info 0;
#X obj -187 105 cnv 15 250 40 empty empty empty 20 12 0 14 -4034 -66577
0;
#X obj -78 302 cnv 15 350 20 empty empty empty 20 12 0 14 -4034 -66577
@@ -471,7 +482,6 @@ of drawing contours;
#X obj 174 12 * 20;
#X obj 174 34 + 2;
#X obj 269 364 unpack f f f;
-#X text 188 403 number of segments;
#X floatatom 338 424 5 0 0 0 - - -;
#X text 154 -25 selected contour;
#X obj -4 86 unpack;
@@ -485,9 +495,23 @@ of drawing contours;
0.70625 0.804167;
#X text -123 245 rotrect corners coordinates;
#X text 160 424 length of contour (in pixels);
+#X obj 450 153 list split 20;
+#X obj 450 175 t b a;
+#X obj 497 222 list;
+#X msg 477 259 \$15;
+#X obj 477 281 +;
+#X obj 505 281 f;
+#X msg 500 122 0;
+#X obj 462 303 f;
+#X obj 431 119 t b a b;
+#X floatatom 462 325 5 0 0 0 - - -;
+#X text 325 323 total number of points;
+#X obj 462 343 s point_number;
+#X text 201 403 number of points;
#X connect 6 0 16 0;
-#X connect 7 0 36 0;
+#X connect 7 0 35 0;
#X connect 7 1 8 0;
+#X connect 7 1 53 0;
#X connect 8 0 11 0;
#X connect 11 0 12 0;
#X connect 11 1 28 0;
@@ -500,19 +524,34 @@ of drawing contours;
#X connect 19 1 21 0;
#X connect 22 0 19 0;
#X connect 22 1 32 0;
-#X connect 28 0 41 0;
+#X connect 28 0 40 0;
#X connect 28 1 18 0;
#X connect 29 0 30 0;
#X connect 30 0 31 0;
#X connect 31 0 7 1;
#X connect 32 0 25 0;
#X connect 32 1 26 0;
-#X connect 32 2 34 0;
-#X connect 36 0 37 0;
-#X connect 36 1 38 0;
-#X connect 36 1 30 1;
+#X connect 32 2 33 0;
+#X connect 35 0 36 0;
+#X connect 35 1 37 0;
+#X connect 35 1 30 1;
+#X connect 40 0 41 0;
#X connect 41 0 42 0;
-#X connect 42 0 43 0;
+#X connect 45 0 46 0;
+#X connect 45 1 47 1;
+#X connect 46 0 47 0;
+#X connect 46 1 48 0;
+#X connect 47 0 45 0;
+#X connect 48 0 49 0;
+#X connect 49 0 50 0;
+#X connect 49 0 52 1;
+#X connect 50 0 49 1;
+#X connect 51 0 49 1;
+#X connect 52 0 54 0;
+#X connect 53 0 52 0;
+#X connect 53 1 45 0;
+#X connect 53 2 51 0;
+#X connect 54 0 56 0;
#X restore 675 294 pd info;
#X text 29 498 <num of contour> 20 <contour area> <rotrect corners
coordinates (8 floats)> <rotrect center position (2 floats)> <rotrect
@@ -527,13 +566,14 @@ size (2 floats)> <angle in degrees> <number of points> <contour length>
;
#X text 30 409 Inlet 1: message: taboutput <0|1>;
#X text 30 359 Inlet 1: message: hierarchy_level [float];
+#X obj 514 96 pix_image examples/dessin.tif;
#X connect 13 0 14 0;
#X connect 14 0 13 0;
#X connect 39 0 47 0;
#X connect 40 0 54 0;
#X connect 41 0 40 0;
#X connect 42 0 41 0;
-#X connect 42 1 55 0;
+#X connect 42 1 73 0;
#X connect 43 0 42 0;
#X connect 44 0 54 0;
#X connect 45 0 44 0;
@@ -545,10 +585,10 @@ size (2 floats)> <angle in degrees> <number of points> <contour length>
#X connect 50 0 49 0;
#X connect 51 0 50 0;
#X connect 52 0 45 0;
-#X connect 54 1 56 0;
-#X connect 54 1 64 0;
+#X connect 54 1 55 0;
+#X connect 54 1 63 0;
+#X connect 54 2 64 0;
#X connect 54 2 53 0;
-#X connect 54 2 65 0;
-#X connect 55 0 48 0;
-#X connect 57 0 54 0;
-#X connect 67 0 43 0;
+#X connect 56 0 54 0;
+#X connect 66 0 43 0;
+#X connect 73 0 48 0;
diff --git a/pix_opencv_warpperspective-help.pd b/pix_opencv_warpperspective-help.pd
index d9404bd..4c8749b 100644
--- a/pix_opencv_warpperspective-help.pd
+++ b/pix_opencv_warpperspective-help.pd
@@ -1,4 +1,4 @@
-#N canvas 622 378 980 660 10;
+#N canvas 616 396 980 660 10;
#X obj 24 25 gemhead;
#X obj 411 543 gemwin;
#X msg 411 509 create \, 1;
@@ -9,16 +9,16 @@
#X obj 24 4 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 24 539 pix_opencv_warpperspective;
-#X msg 96 437 mapMatrix 1 0 0 0 1 0 0 0 1;
-#X text 95 418 you can also set the map matrix directly;
-#X msg 96 457 mapMatrix 0.5 0 0 0 0.5 0 0 0 1;
-#X text 301 436 identity;
-#X text 322 458 scale by 0.5;
-#X msg 96 477 mapMatrix 0 1 0 1 0 0 0 0 2;
-#X text 295 479 rotation by 90deg and scale by 0.5;
+#X msg 76 367 mapMatrix 1 0 0 0 1 0 0 0 1;
+#X text 75 348 you can also set the map matrix directly;
+#X msg 76 387 mapMatrix 0.5 0 0 0 0.5 0 0 0 1;
+#X text 281 366 identity;
+#X text 302 388 scale by 0.5;
+#X msg 76 407 mapMatrix 0 1 0 1 0 0 0 0 2;
+#X text 275 409 rotation by 90deg and scale by 0.5;
#X obj 24 93 pix_video;
#X obj 24 133 pix_flip;
-#N canvas 3 81 936 545 wrap_perspective_GPU 0;
+#N canvas 1 105 936 545 wrap_perspective_GPU 0;
#X obj 251 443 mesh_square 10 10;
#X obj 301 277 /;
#X obj 351 278 /;
@@ -74,7 +74,6 @@ matrix.;
#X connect 21 1 12 0;
#X connect 24 0 16 0;
#X restore 161 604 pd wrap_perspective_GPU;
-#X obj 24 113 pix_grey;
#X msg 43 233 dstMatrix 0 0 0 1 1 1 1 0;
#X msg 59 281 srcMatrix 0 0 0 1 1 1 1 0;
#X text 203 234 destination matrix;
@@ -94,6 +93,12 @@ message to apply the transformation;
#X text 112 25 see examples/05-perspective_correction for an example
of the use of pix_opencv_warpperspective with pix_opencv_findchessboardcorners
to correct perspective;
+#X obj 24 112 pix_grey;
+#X msg 123 480 invert \$1;
+#X obj 123 452 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X text 140 450 invert transformation matrix (same as swaping src and
+dst matrix);
#X connect 0 0 16 0;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
@@ -104,9 +109,11 @@ to correct perspective;
#X connect 9 0 8 0;
#X connect 11 0 8 0;
#X connect 14 0 8 0;
-#X connect 16 0 19 0;
+#X connect 16 0 31 0;
#X connect 17 0 8 0;
-#X connect 19 0 17 0;
+#X connect 19 0 8 0;
#X connect 20 0 8 0;
-#X connect 21 0 8 0;
-#X connect 25 0 8 0;
+#X connect 24 0 8 0;
+#X connect 31 0 17 0;
+#X connect 32 0 8 0;
+#X connect 33 0 32 0;