#N canvas 277 66 1040 775 10; #X obj 580 466 cnv 15 550 250 empty empty empty 20 12 0 14 -24198 -66577 0; #X floatatom 717 652 5 0 0 0 - - -; #X obj 600 684 pix_opencv_contours_boundingrect; #X floatatom 803 666 5 0 0 0 - - -; #X floatatom 733 816 5 0 0 0 - - -; #X floatatom 768 816 5 0 0 0 - - -; #X floatatom 805 816 5 0 0 0 - - -; #X floatatom 839 816 5 0 0 0 - - -; #X obj 730 787 unpack 0 0 0 0 0; #X obj 730 736 route 0 1 2 3 4; #X text 790 754 For each contour detected; #X text 29 172 It is useful as a motion tracker if you have well isolated silouets of the objects you want to track.; #X msg 621 480 mode \$1; #X obj 682 481 hradio 15 1 0 4 empty empty empty 0 -8 0 10 -262144 -1 -1 0; #X text 751 482 retrieval mode ( see cvFindContours ); #X obj 717 506 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1 -1 0; #X text 799 506 retrieval method ( see cvFindContours ); #X msg 650 505 method \$1; #X msg 673 528 maxmove \$1; #X floatatom 747 529 5 0 0 0 - - -; #X floatatom 771 553 5 0 0 0 - - -; #X msg 683 550 ftolerance \$1; #X text 808 551 frame tolerance for identification ( default 5 ); #X text 30 138 pix_opencv_contours_boundingrect :: Calculates up-right bounding rectangle of all contours of a binary image.; #X text 29 211 This object considers a contour to be analyzed any group of white pixels in a black background \, for this reason you will find useful to use pdp_bgsubstract or pdp_threshold to obtain a correct input for pix_opencv_contours_boundingrect.; #X text 29 265 pix_opencv_contours_boundingrect works detecting any white areas in the input image \, it's important to set max/min values of the areas you want to detect to filter non interesting noise or areas \, also sometimes you will need to use pix_opencv_morphology to transform the contours of the shapes to be analyzed..; #X floatatom 833 719 5 0 0 0 - - -; #X text 871 720 number of contours; #X msg 698 575 nightmode \$1; #X obj 788 576 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 777 597 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 790 619 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X msg 717 596 draw \$1; #X text 804 595 draw bounding rectangle ( default : on ); #X msg 732 617 show \$1; #X text 817 616 draw the detected contours ( default : off ); #X text 811 576 hide original image ( default : off ); #X obj 715 44 gemhead; #X obj 596 842 pix_texture; #X obj 596 861 square 2; #X obj 33 40 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 22 454 304 gemwin 0; #X obj 67 89 outlet; #X obj 67 10 inlet; #X obj 65 41 route create; #X msg 67 70 set destroy; #X msg 182 68 set create; #N canvas 87 154 247 179 Gem.init 0; #X obj 118 46 loadbang; #X msg 118 81 reset; #X obj 118 113 outlet; #X connect 0 0 1 0; #X connect 1 0 2 0; #X restore 289 80 pd Gem.init; #X obj 162 241 gemwin; #X msg 161 188 create \, 1; #X msg 237 189 destroy; #X msg 283 161 frame 25; #X obj 164 126 t b b b; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 2 0 10 0; #X connect 2 1 4 0; #X connect 2 1 8 0; #X connect 3 0 0 0; #X connect 4 0 0 0; #X connect 7 0 6 0; #X connect 8 0 6 0; #X connect 9 0 6 0; #X connect 10 0 7 0; #X connect 10 2 9 0; #X restore 43 84 pd gemwin; #X msg 43 66 destroy; #X obj 444 838 pix_texture; #X obj 444 866 square 2; #X obj 596 371 separator; #X obj 727 71 bng 25 250 50 0 load empty empty 0 -6 0 8 -262144 -1 -1; #X obj 784 246 bng 15 250 50 0 empty empty end_reached 20 7 0 10 -262144 -1 -1; #X floatatom 766 211 5 0 10000 1 frame# - -; #X obj 727 100 openpanel; #X msg 727 120 open \$1; #X obj 715 229 pix_film; #X msg 733 163 auto \$1; #X obj 733 145 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1; #X text 41 46 Create window and render; #X msg 828 146 colorspace RGBA; #X msg 933 146 colorspace RGB; #X msg 1037 146 colorspace Grey; #X obj 828 118 loadbang; #X obj 595 342 pix_separator; #X obj 444 374 separator; #X obj 444 345 pix_separator; #X obj 444 409 translateXYZ -2 0 0; #X obj 596 406 translateXYZ 2 0 0; #N canvas 0 0 450 300 vswitch 0; #X obj 144 263 outlet; #X obj 36 26 inlet;