From 14ecccfc24fdc05b2f6ff7926677461e9222acf6 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Sat, 30 May 2009 15:36:48 +0000 Subject: floodfill as the sample example svn path=/trunk/externals/pdp_opencv/; revision=11591 --- pdp_opencv_floodfill-help.pd | 102 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 82 insertions(+), 20 deletions(-) (limited to 'pdp_opencv_floodfill-help.pd') diff --git a/pdp_opencv_floodfill-help.pd b/pdp_opencv_floodfill-help.pd index f8dc2db..8aa3a5f 100644 --- a/pdp_opencv_floodfill-help.pd +++ b/pdp_opencv_floodfill-help.pd @@ -1,20 +1,82 @@ -#N canvas 0 0 521 599 10; -#X obj 101 158 pdp_xv; -#X msg 101 -138 open /dev/video0; -#X obj 101 57 pdp_v4l2; -#X msg 207 60 set; -#X floatatom 273 102 5 0 0 0 - - -; -#X text 317 103 number of frames to take as average bg; -#X obj 191 224 pdp_xv; -#X floatatom 363 168 5 0 0 0 - - -; -#X text 407 169 number of frames to take as average bg; -#X obj 191 165 pdp_opencv_floodfill; -#X obj 101 99 pdp_opencv_threshold; -#X connect 1 0 2 0; -#X connect 2 0 10 0; -#X connect 3 0 10 0; -#X connect 4 0 10 2; -#X connect 7 0 9 1; -#X connect 9 0 6 0; -#X connect 10 0 0 0; -#X connect 10 0 9 0; +#N canvas 461 101 826 623 10; +#X msg 91 -56 open /dev/video0; +#X obj 109 41 pdp_v4l2; +#X obj 104 390 pdp_xv; +#X obj 104 279 pdp_opencv_floodfill; +#X obj 109 -6 metro 40; +#X text 102 489 used in tracking algorithms as an object selector; +#X text 102 502 Written by Lluis Gomez i Bigorda ( lluis@artefacte.org +); +#X text 102 516 and Yves Degoyon ( ydegoyon@gmail.com ); +#X floatatom 270 240 5 0 0 0 - - -; +#X floatatom 277 260 5 0 0 0 - - -; +#X msg 110 -37 bang; +#X msg 206 -54 open /dev/video0; +#X obj 216 -4 metro 40; +#X msg 217 -35 bang; +#X obj 216 32 pdp_v4l; +#X msg 213 70 mark \$1 \$2; +#X obj 104 417 route press; +#X msg 260 219 color \$1; +#X obj 322 220 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X text 348 218 activate color mode ( default : on ); +#X msg 154 389 cursor 1; +#X msg 249 144 fillcolor 1 255 0 123; +#X text 387 145 fillcolor of nth component ( 1 < n < 10 ); +#X text 226 389 <-- click in the video window on the shape/component +you want to mark; +#X text 288 56 mark %x %y : mark a component; +#X text 288 68 ( 0 <= %x <= 1 ); +#X text 289 79 ( 0 <= %y <= 1 ); +#X obj 221 307 route 0 1 2 3 4 5 6 7 8 9; +#X floatatom 222 352 5 0 0 0 - - -; +#X floatatom 258 353 5 0 0 0 - - -; +#X floatatom 294 353 5 0 0 0 - - -; +#X floatatom 330 353 5 0 0 0 - - -; +#X obj 222 330 unpack f f f f; +#X text 224 369 X; +#X text 261 369 Y; +#X text 293 370 Width; +#X text 331 370 Height; +#X msg 228 98 delete 1; +#X msg 242 120 clear; +#X text 288 98 delete a component ( 1 <= index <= 10 ); +#X text 291 120 delete all components; +#X text 380 308 detected components; +#X text 311 239 outbound tolerance ( default 20 ); +#X text 317 259 inbound tolerance ( default 20 ); +#X msg 256 170 connectivty 4; +#X msg 258 193 connectivty 8; +#X text 350 181 set connectivity ( default 4 ); +#X text 101 466 pdp_opencv_floodfill : mark image components with a +specific color; +#X connect 0 0 3 0; +#X connect 1 0 3 0; +#X connect 2 0 16 0; +#X connect 3 0 2 0; +#X connect 3 0 20 0; +#X connect 3 1 27 0; +#X connect 4 0 1 0; +#X connect 8 0 3 1; +#X connect 9 0 3 2; +#X connect 10 0 4 0; +#X connect 11 0 14 0; +#X connect 12 0 14 0; +#X connect 13 0 12 0; +#X connect 14 0 3 0; +#X connect 15 0 3 0; +#X connect 16 0 15 0; +#X connect 17 0 3 0; +#X connect 18 0 17 0; +#X connect 20 0 2 0; +#X connect 21 0 3 0; +#X connect 27 0 32 0; +#X connect 32 0 28 0; +#X connect 32 1 29 0; +#X connect 32 2 30 0; +#X connect 32 3 31 0; +#X connect 37 0 3 0; +#X connect 38 0 3 0; +#X connect 44 0 3 0; +#X connect 45 0 3 0; -- cgit v1.2.1