#N canvas 216 165 968 473 10; #X obj 477 6 cnv 15 480 460 empty empty empty 20 12 0 14 -228992 -66577 0; #X obj 20 75 cnv 15 450 200 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 21 326 cnv 15 450 140 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 22 331 Inlets:; #X obj 21 286 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 0; #X text 30 285 Arguments:; #X text 22 400 Outlets:; #X obj 491 41 cnv 15 460 310 empty empty empty 20 12 0 14 -24198 -66577 0; #X obj 501 326 pix_opencv_matchshape; #X obj 501 14 gemhead; #X obj 501 377 pix_texture; #X obj 501 398 rectangle 4 3; #X msg 570 103 contour 4 2 0 0 0 1 1 1 1 0; #X msg 556 239 method \$1; #X floatatom 556 217 5 0 0 0 - - -; #X msg 580 153 template 4 2 0 0 0 1 1 1 1 0; #X msg 590 173 template 4 2 2 0 4 1 1 1 1 0; #X msg 560 83 contour 6 2 0 0 0 1 1 1 1 0 -0.5 -0.5; #X floatatom 556 267 5 0 0 0 - - -; #X msg 556 287 threshold \$1; #X msg 550 64 contour 4 2 2 0 4 1 1 1 1 0; #X obj 624 357 route match_vec template_vec; #X obj 624 407 unpack; #X text 631 390 found corresponding contour; #X floatatom 624 435 5 0 0 0 - - -; #X floatatom 659 435 5 0 0 0 - - -; #X text 623 448 id; #X text 659 448 absolute difference from template; #X floatatom 706 378 5 0 0 0 - - -; #X text 740 375 number of loaded contour; #X text 593 213 method to compare shape (1 \, 2 or 3 \, please refer to OpenCV doc for details); #X text 37 193 This external uses cv::matchShapes function. Documentation is here : http://docs.opencv.org/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=matchshapes#matchshapes ; #X text 588 266 threshold behind wich a shape is recognized; #X text 575 135 template message add a template to library; #X text 549 46 contour message compare the contour to each loaded contour ; #X text 37 103 [pix_opencv_matchshape] compares input images or input contours to a library of images (or contours). It sends out the id of the closest found behind a threshold.; #X text 37 143 You can use pix_opencv_contour_convexhull2 to find all contours in the image and send them to pix_opencv_matchshape to recognize it.; #X text 20 79 Description: compares shapes; #X text 45 24 Synopsis: [pix_opencv_matchshape]; #X text 67 40 Class: pix_opencv; #X text 76 296 none; #X text 40 353 Inlet 1: message: template ; #X text 40 363 Inlet 1: message: contour ; #X text 40 373 Inlet 1: message: method ; #X text 40 383 Inlet 1: message: threshold ; #X text 34 413 Outlet 1: input image; #X text 40 343 Inlet 1: image; #X obj 364 368 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 0 450 300 gemwin 0; #X obj 132 136 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 112 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 369 407 pd gemwin; #X msg 369 388 create; #X text 365 367 Create window:; #X connect 8 0 10 0; #X connect 8 1 21 0; #X connect 9 0 8 0; #X connect 10 0 11 0; #X connect 12 0 8 0; #X connect 13 0 8 0; #X connect 14 0 13 0; #X connect 15 0 8 0; #X connect 16 0 8 0; #X connect 17 0 8 0; #X connect 18 0 19 0; #X connect 19 0 8 0; #X connect 20 0 8 0; #X connect 21 0 22 0; #X connect 21 1 28 0; #X connect 22 0 24 0; #X connect 22 1 25 0; #X connect 48 0 49 0; #X connect 49 0 48 0;