diff options
Diffstat (limited to 'pix_opencv_contours-help.pd')
-rw-r--r-- | pix_opencv_contours-help.pd | 453 |
1 files changed, 453 insertions, 0 deletions
diff --git a/pix_opencv_contours-help.pd b/pix_opencv_contours-help.pd new file mode 100644 index 0000000..895cb9c --- /dev/null +++ b/pix_opencv_contours-help.pd @@ -0,0 +1,453 @@ +#N canvas 711 354 1125 496 10; +#X obj 472 38 cnv 15 220 250 empty empty empty 20 12 0 14 -228992 -66577 +0; +#X obj 11 56 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 12 207 cnv 15 450 130 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X text 13 212 Inlets:; +#X obj 12 167 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 +0; +#X text 21 166 Arguments:; +#X text 13 281 Outlets:; +#X text 478 20 Example:; +#X text 37 5 Synopsis: [pix_opencv_contours_convexhull2]; +#X text 58 21 Class: pix_opencv; +#X text 11 60 Description: finds contours; +#X text 67 176 none; +#X text 31 234 Inlet 1: message: area [float]; +#X text 31 244 Inlet 1: message: epsilon [float]; +#X obj 541 151 pix_texture; +#X text 37 75 [pix_opencv_contours_convexhull2] finds contours in incomming +image \, simplifies it according to the epsilon value and outputs contours +with area greater than area value on second outlet; +#X obj 487 171 pix_gray; +#X obj 487 141 pix_buf; +#N canvas 880 297 919 782 drawcontours 0; +#X obj 249 179 list split 2; +#X obj 422 675 GEMglEnd; +#X obj 461 611 GEMglVertex2d; +#X obj 283 310 list append; +#X obj 312 284 t b a; +#X obj 312 263 list split 2; +#X obj 472 514 unpack; +#X obj 381 304 t b a; +#X obj 283 206 t b a b; +#X obj 500 311 color 1 0 0 1; +#X obj 536 564 * -8; +#X obj 536 584 + 4; +#N canvas 716 313 619 726 color 0; +#X obj 201 -38 inlet; +#X obj 302 -38 inlet; +#X obj 158 66 f; +#X msg 302 10 0; +#X obj 158 147 * 6; +#X obj 254 104 t f f; +#X obj 281 133 int; +#X obj 254 150 -; +#N canvas 3 85 579 581 h2rgb 0; +#X obj 171 79 t f f; +#X obj 171 332 spigot; +#X obj 204 168 == 0; +#X obj 204 123 int; +#X msg 171 362 1 \$1 0; +#X obj 221 332 spigot; +#X obj 271 332 spigot; +#X obj 321 332 spigot; +#X obj 254 168 == 1; +#X obj 304 168 == 2; +#X obj 354 168 == 3; +#X obj 371 332 spigot; +#X obj 421 332 spigot; +#X obj 404 168 == 4; +#X obj 454 168 == 5; +#X msg 221 362 \$1 1 0; +#X obj 171 404 t a; +#X obj 95 246 abs; +#X obj 95 226 - 1; +#X obj 68 282 -; +#X msg 68 246 1; +#X msg 271 362 0 1 \$1; +#X msg 321 362 0 \$1 1; +#X msg 371 362 \$1 0 1; +#X msg 421 362 1 0 \$1; +#X obj 114 162 int; +#X obj 95 206 -; +#X obj 114 142 / 2; +#X obj 114 183 * 2; +#X obj 68 118 t f f f; +#X obj 171 48 inlet; +#X obj 171 439 outlet; +#X connect 0 0 29 0; +#X connect 0 1 3 0; +#X connect 1 0 4 0; +#X connect 2 0 1 1; +#X connect 3 0 2 0; +#X connect 3 0 8 0; +#X connect 3 0 9 0; +#X connect 3 0 10 0; +#X connect 3 0 13 0; +#X connect 3 0 14 0; +#X connect 4 0 16 0; +#X connect 5 0 15 0; +#X connect 6 0 21 0; +#X connect 7 0 22 0; +#X connect 8 0 5 1; +#X connect 9 0 6 1; +#X connect 10 0 7 1; +#X connect 11 0 23 0; +#X connect 12 0 24 0; +#X connect 13 0 11 1; +#X connect 14 0 12 1; +#X connect 15 0 16 0; +#X connect 16 0 31 0; +#X connect 17 0 19 1; +#X connect 18 0 17 0; +#X connect 19 0 1 0; +#X connect 19 0 5 0; +#X connect 19 0 6 0; +#X connect 19 0 7 0; +#X connect 19 0 11 0; +#X connect 19 0 12 0; +#X connect 20 0 19 0; +#X connect 21 0 16 0; +#X connect 22 0 16 0; +#X connect 23 0 16 0; +#X connect 24 0 16 0; +#X connect 25 0 28 0; +#X connect 26 0 18 0; +#X connect 27 0 25 0; +#X connect 28 0 26 1; +#X connect 29 0 20 0; +#X connect 29 1 26 0; +#X connect 29 2 27 0; +#X connect 30 0 0 0; +#X restore 158 176 pd h2rgb; +#X obj 254 83 + 0.9; +#X obj 182 240 outlet; +#X connect 0 0 2 0; +#X connect 1 0 3 0; +#X connect 2 0 9 0; +#X connect 2 0 4 0; +#X connect 3 0 2 1; +#X connect 4 0 8 0; +#X connect 5 0 7 0; +#X connect 5 1 6 0; +#X connect 6 0 7 1; +#X connect 7 0 2 1; +#X connect 8 0 10 0; +#X connect 9 0 5 0; +#X restore 575 281 pd color; +#X obj 249 117 t a b; +#X obj 500 375 GEMglLineWidth 2; +#X obj 249 64 inlet; +#X obj 500 344 scaleXYZ 1 1 1; +#X obj 472 564 * 10.6666; +#X obj 472 584 - 5.33333; +#X floatatom 616 324 5 0 0 0 - - -; +#X obj 620 207 inlet; +#X obj 422 646 gemlist; +#X obj 461 442 gemlist; +#X obj 500 411 GEMglBegin GL_LINE_LOOP; +#X obj 620 236 t b; +#X obj 500 248 gemhead; +#X obj 500 193 loadbang; +#X msg 500 214 0; +#X obj 204 208 unpack 0 0; +#X floatatom 204 229 5 0 0 0 nb_of_segments - -; +#X connect 0 0 28 0; +#X connect 0 1 8 0; +#X connect 2 0 21 1; +#X connect 3 0 5 0; +#X connect 4 0 3 0; +#X connect 4 1 7 0; +#X connect 5 0 4 0; +#X connect 5 1 3 1; +#X connect 6 0 17 0; +#X connect 6 1 10 0; +#X connect 7 0 22 0; +#X connect 7 1 6 0; +#X connect 8 0 21 0; +#X connect 8 1 5 0; +#X connect 8 2 25 0; +#X connect 9 0 16 0; +#X connect 10 0 11 0; +#X connect 11 0 2 2; +#X connect 12 0 9 1; +#X connect 13 0 0 0; +#X connect 13 1 12 0; +#X connect 14 0 23 0; +#X connect 15 0 13 0; +#X connect 16 0 14 0; +#X connect 17 0 18 0; +#X connect 18 0 2 1; +#X connect 19 0 16 2; +#X connect 20 0 24 0; +#X connect 21 0 1 0; +#X connect 22 0 2 0; +#X connect 23 0 22 1; +#X connect 24 0 12 1; +#X connect 25 0 9 0; +#X connect 26 0 27 0; +#X connect 27 0 25 0; +#X connect 28 0 29 0; +#X restore 575 315 pd drawcontours; +#X obj 487 76 t b a a; +#X obj 487 57 gemhead 1; +#X msg 542 214 epsilon \$1; +#X floatatom 542 197 5 0 0 0 - - -; +#X obj 625 121 loadbang; +#X obj 541 171 rectangle 5.333 4; +#X obj 514 116 t a a; +#X obj 514 96 pix_image dessin.tif; +#X msg 617 214 area \$1; +#X floatatom 617 197 5 0 0 0 - - -; +#X msg 659 142 10; +#X obj 354 215 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 +0; +#N canvas 1 86 450 300 gemwin 0; +#X obj 132 156 gemwin; +#X obj 67 89 outlet; +#X obj 67 10 inlet; +#X obj 67 41 route create; +#X msg 67 70 set destroy; +#X msg 142 68 set create; +#X msg 198 112 destroy; +#X msg 132 132 reset \, dimen 640 480 \, create \, 1; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 0 7 0; +#X connect 3 1 5 0; +#X connect 3 1 6 0; +#X connect 4 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 0 0; +#X connect 7 0 0 0; +#X restore 359 254 pd gemwin; +#X msg 359 235 destroy; +#X text 355 214 Create window:; +#X text 31 224 Inlet 1: binarized image; +#X msg 625 141 2; +#X obj 487 240 pix_opencv_contours_convexhull; +#N canvas 1201 172 474 845 draw_rotrect 0; +#X obj 71 506 GEMglVertex2d; +#X obj 71 586 GEMglVertex2d; +#X obj 71 666 GEMglVertex2d; +#X obj 71 746 GEMglVertex2d; +#X obj 71 766 GEMglEnd; +#X obj 71 277 alpha; +#X obj 143 178 list split 1; +#X obj 71 420 GEMglBegin GL_LINE_LOOP; +#X obj 177 198 list split 8; +#X msg 363 324 0 0 0 0 0 0 0 0; +#X obj 71 300 color 1 0 0 1; +#N canvas 712 325 619 726 color 0; +#X obj 201 -38 inlet; +#X obj 158 66 f; +#X msg 302 10 0; +#X obj 158 147 * 6; +#X obj 254 104 t f f; +#X obj 281 133 int; +#X obj 254 150 -; +#N canvas 1 91 579 581 h2rgb 0; +#X obj 171 79 t f f; +#X obj 171 332 spigot; +#X obj 204 168 == 0; +#X obj 204 123 int; +#X msg 171 362 1 \$1 0; +#X obj 221 332 spigot; +#X obj 271 332 spigot; +#X obj 321 332 spigot; +#X obj 254 168 == 1; +#X obj 304 168 == 2; +#X obj 354 168 == 3; +#X obj 371 332 spigot; +#X obj 421 332 spigot; +#X obj 404 168 == 4; +#X obj 454 168 == 5; +#X msg 221 362 \$1 1 0; +#X obj 171 404 t a; +#X obj 95 246 abs; +#X obj 95 226 - 1; +#X obj 68 282 -; +#X msg 68 246 1; +#X msg 271 362 0 1 \$1; +#X msg 321 362 0 \$1 1; +#X msg 371 362 \$1 0 1; +#X msg 421 362 1 0 \$1; +#X obj 114 162 int; +#X obj 95 206 -; +#X obj 114 142 / 2; +#X obj 114 183 * 2; +#X obj 68 118 t f f f; +#X obj 171 48 inlet; +#X obj 171 439 outlet; +#X connect 0 0 29 0; +#X connect 0 1 3 0; +#X connect 1 0 4 0; +#X connect 2 0 1 1; +#X connect 3 0 2 0; +#X connect 3 0 8 0; +#X connect 3 0 9 0; +#X connect 3 0 10 0; +#X connect 3 0 13 0; +#X connect 3 0 14 0; +#X connect 4 0 16 0; +#X connect 5 0 15 0; +#X connect 6 0 21 0; +#X connect 7 0 22 0; +#X connect 8 0 5 1; +#X connect 9 0 6 1; +#X connect 10 0 7 1; +#X connect 11 0 23 0; +#X connect 12 0 24 0; +#X connect 13 0 11 1; +#X connect 14 0 12 1; +#X connect 15 0 16 0; +#X connect 16 0 31 0; +#X connect 17 0 19 1; +#X connect 18 0 17 0; +#X connect 19 0 1 0; +#X connect 19 0 5 0; +#X connect 19 0 6 0; +#X connect 19 0 7 0; +#X connect 19 0 11 0; +#X connect 19 0 12 0; +#X connect 20 0 19 0; +#X connect 21 0 16 0; +#X connect 22 0 16 0; +#X connect 23 0 16 0; +#X connect 24 0 16 0; +#X connect 25 0 28 0; +#X connect 26 0 18 0; +#X connect 27 0 25 0; +#X connect 28 0 26 1; +#X connect 29 0 20 0; +#X connect 29 1 26 0; +#X connect 29 2 27 0; +#X connect 30 0 0 0; +#X restore 158 176 pd h2rgb; +#X obj 254 83 + 0.9; +#X obj 182 240 outlet; +#X obj 302 -38 inlet RESET; +#X connect 0 0 1 0; +#X connect 1 0 8 0; +#X connect 1 0 3 0; +#X connect 2 0 1 1; +#X connect 3 0 7 0; +#X connect 4 0 6 0; +#X connect 4 1 5 0; +#X connect 5 0 6 1; +#X connect 6 0 1 1; +#X connect 7 0 9 0; +#X connect 8 0 4 0; +#X connect 10 0 2 0; +#X restore 262 248 pd color; +#X obj 71 -10 inlet INFO; +#X obj 71 256 gemhead; +#X obj 15 147 loadbang; +#X msg 15 168 0; +#X obj 71 52 t b a b; +#X floatatom 378 220 5 0 0 0 - - -; +#X obj 378 199 list length; +#X obj 211 504 list split 2; +#X obj 177 448 list split 2; +#X obj 137 472 unpack; +#X obj 211 525 unpack; +#X obj 245 564 list split 2; +#X obj 245 585 unpack; +#X obj 279 664 list split 2; +#X obj 279 685 unpack; +#X obj 90 84 list split 2; +#X obj 95 154 list append; +#X obj 124 107 list split 14; +#X obj 292 81 t b; +#X obj 262 198 t b; +#X obj 124 128 t b b a b; +#X obj 71 18 route 0; +#X floatatom 342 463 5 0 0 0 - - -; +#X obj 342 442 list length; +#X obj 71 400 GEMglLineWidth 1; +#X floatatom 145 261 5 0 0 0 - - -; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 5 0 10 0; +#X connect 6 1 8 0; +#X connect 7 0 0 0; +#X connect 9 0 20 0; +#X connect 10 0 36 0; +#X connect 11 0 10 1; +#X connect 12 0 33 0; +#X connect 13 0 5 0; +#X connect 14 0 15 0; +#X connect 15 0 13 0; +#X connect 16 1 27 0; +#X connect 16 1 18 0; +#X connect 16 2 30 0; +#X connect 18 0 17 0; +#X connect 19 0 22 0; +#X connect 19 1 23 0; +#X connect 20 0 21 0; +#X connect 20 1 19 0; +#X connect 21 0 0 1; +#X connect 21 1 0 2; +#X connect 22 0 1 1; +#X connect 22 1 1 2; +#X connect 23 0 24 0; +#X connect 23 1 25 0; +#X connect 24 0 2 1; +#X connect 24 1 2 2; +#X connect 25 0 26 0; +#X connect 26 0 3 1; +#X connect 26 1 3 2; +#X connect 27 1 29 0; +#X connect 28 0 29 0; +#X connect 29 0 32 0; +#X connect 29 1 28 1; +#X connect 30 0 9 0; +#X connect 30 0 11 1; +#X connect 31 0 11 0; +#X connect 32 0 28 0; +#X connect 32 1 13 0; +#X connect 32 2 6 0; +#X connect 32 2 35 0; +#X connect 32 3 31 0; +#X connect 33 1 16 0; +#X connect 35 0 34 0; +#X connect 36 0 7 0; +#X restore 673 315 pd draw_rotrect; +#X text 31 353 <contour area> <rotrect corners coordinates (8 floats)> +<rotrect center position (2 floats)> <rotrect size (2 floats)> <angle> +; +#X msg 359 235 create; +#X text 355 214 Create window:; +#X text 31 224 Inlet 1: binarized image; +#X text 25 304 Outlet 2: data output; +#X text 21 343 info; +#X text 21 393 contour; +#X text 31 403 <number of segments> <2> <x \, y corner coordinate pairs> +; +#X obj 575 265 route contour; +#X obj 673 265 route info; +#X connect 14 0 24 0; +#X connect 16 0 36 0; +#X connect 17 0 16 0; +#X connect 19 0 17 0; +#X connect 19 1 26 0; +#X connect 19 2 18 1; +#X connect 20 0 19 0; +#X connect 21 0 36 0; +#X connect 22 0 21 0; +#X connect 23 0 35 0; +#X connect 23 0 29 0; +#X connect 25 0 17 0; +#X connect 25 1 14 0; +#X connect 26 0 25 0; +#X connect 27 0 36 0; +#X connect 28 0 27 0; +#X connect 29 0 28 0; +#X connect 31 0 32 0; +#X connect 32 0 31 0; +#X connect 35 0 22 0; |