diff options
author | Antoine Villeret <avilleret@users.sourceforge.net> | 2012-12-07 17:57:13 +0000 |
---|---|---|
committer | Antoine Villeret <avilleret@users.sourceforge.net> | 2012-12-07 17:57:13 +0000 |
commit | 10d9a412a7a5d56e5061f1003d1fc244c7322197 (patch) | |
tree | d3dc04dced0df9894a2cf9d74fb4a46a4b16bb73 | |
parent | bb63849f6bf5a14d7e06daef8da121b1f3150f5e (diff) |
- add contours and matchshape to build process
- update help file
svn path=/trunk/externals/pix_opencv/; revision=16651
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | pix_opencv_contours-help.pd | 73 | ||||
-rw-r--r-- | pix_opencv_contours.cc (renamed from pix_opencv_contours.cpp) | 3 | ||||
-rw-r--r-- | pix_opencv_contours_convexity-help.pd | 2 | ||||
-rw-r--r-- | pix_opencv_matchshape.cc (renamed from pix_opencv_matchshape.cpp) | 0 |
5 files changed, 43 insertions, 38 deletions
@@ -31,7 +31,7 @@ endif .SUFFIXES = $(EXTENSION) -SOURCES = pix_opencv_edge.cc pix_opencv_laplace.cc pix_opencv_morphology.cc pix_opencv_distrans.cc pix_opencv_motempl.cc pix_opencv_haarcascade.cc pix_opencv_contours_boundingrect.cc pix_opencv_bgsubstract.cc pix_opencv_contours_convexity.cc pix_opencv_dft.cc pix_opencv_lk.cc pix_opencv_hist_compare.cc pix_opencv_knear.cc pix_opencv_threshold.cc pix_opencv_floodfill.cc pix_opencv_athreshold.cc pix_opencv_bgstats.cc pix_opencv_camshift.cc pix_opencv_hu_compare.cc pix_opencv_pgh_compare.cc pix_opencv_hough_circles.cc pix_opencv_hough_lines.cc pix_opencv_hu_moments.cc pix_opencv_contours_convexhull.cc pix_opencv_colorfilt.cc pix_opencv_of_bm.cc pix_opencv_of_hs.cc pix_opencv_of_lk.cc pix_opencv_calibration.cc pix_opencv_warpperspective.cc pix_opencv_findchessboardcorners.cc pix_opencv_contours.cpp pix_opencv_matchshape.cpp +SOURCES = pix_opencv_edge.cc pix_opencv_laplace.cc pix_opencv_morphology.cc pix_opencv_distrans.cc pix_opencv_motempl.cc pix_opencv_haarcascade.cc pix_opencv_contours_boundingrect.cc pix_opencv_bgsubstract.cc pix_opencv_contours_convexity.cc pix_opencv_dft.cc pix_opencv_lk.cc pix_opencv_hist_compare.cc pix_opencv_knear.cc pix_opencv_threshold.cc pix_opencv_floodfill.cc pix_opencv_athreshold.cc pix_opencv_bgstats.cc pix_opencv_camshift.cc pix_opencv_hu_compare.cc pix_opencv_pgh_compare.cc pix_opencv_hough_circles.cc pix_opencv_hough_lines.cc pix_opencv_hu_moments.cc pix_opencv_contours_convexhull.cc pix_opencv_colorfilt.cc pix_opencv_of_bm.cc pix_opencv_of_hs.cc pix_opencv_of_lk.cc pix_opencv_calibration.cc pix_opencv_warpperspective.cc pix_opencv_findchessboardcorners.cc pix_opencv_contours.cc pix_opencv_matchshape.cc all: $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION)) blobtrack @@ -39,7 +39,6 @@ all: $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION)) blobtrack gcc $(LDFLAGS) -o $*.$(EXTENSION) $*.o $(LIBS) .cc.o: - echo .cc.o target g++ $(CPPFLAGS) $(INCLUDES) -o $*.o -c $*.cc .c.o: diff --git a/pix_opencv_contours-help.pd b/pix_opencv_contours-help.pd index 895cb9c..dd0a77f 100644 --- a/pix_opencv_contours-help.pd +++ b/pix_opencv_contours-help.pd @@ -1,11 +1,11 @@ -#N canvas 711 354 1125 496 10; +#N canvas 703 374 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 +#X obj 12 207 cnv 15 450 230 empty empty empty 20 12 0 14 -233017 -66577 0; -#X text 13 212 Inlets:; +#X text 14 210 Inlets:; #X obj 12 167 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 0; #X text 21 166 Arguments:; @@ -23,7 +23,7 @@ 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; +#N canvas 872 273 919 782 drawcontours 0; #X obj 249 179 list split 2; #X obj 422 675 GEMglEnd; #X obj 461 611 GEMglVertex2d; @@ -140,7 +140,6 @@ with area greater than area value on second outlet; #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; @@ -155,42 +154,43 @@ with area greater than area value on second outlet; #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 obj 249 62 inlet CONTOUR; +#X connect 0 0 27 0; #X connect 0 1 8 0; -#X connect 2 0 21 1; +#X connect 2 0 20 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 0 16 0; #X connect 6 1 10 0; -#X connect 7 0 22 0; +#X connect 7 0 21 0; #X connect 7 1 6 0; -#X connect 8 0 21 0; +#X connect 8 0 20 0; #X connect 8 1 5 0; -#X connect 8 2 25 0; -#X connect 9 0 16 0; +#X connect 8 2 24 0; +#X connect 9 0 15 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 connect 14 0 22 0; +#X connect 15 0 14 0; +#X connect 16 0 17 0; +#X connect 17 0 2 1; +#X connect 18 0 15 2; +#X connect 19 0 23 0; +#X connect 20 0 1 0; +#X connect 21 0 2 0; +#X connect 22 0 21 1; +#X connect 23 0 12 1; +#X connect 24 0 9 0; +#X connect 25 0 26 0; +#X connect 26 0 24 0; +#X connect 27 0 28 0; +#X connect 29 0 13 0; #X restore 575 315 pd drawcontours; #X obj 487 76 t b a a; #X obj 487 57 gemhead 1; @@ -228,8 +228,7 @@ with area greater than area value on second outlet; #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; +#N canvas 1199 177 474 845 draw_rotrect 0; #X obj 71 506 GEMglVertex2d; #X obj 71 586 GEMglVertex2d; #X obj 71 666 GEMglVertex2d; @@ -421,33 +420,39 @@ with area greater than area value on second outlet; #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 obj 487 240 pix_opencv_contours; +#X text 26 302 Outlet 2: contour output; +#X text 26 292 Outlet 1: gemlist output; +#X text 26 312 Outlet 3: info output; #X connect 14 0 24 0; -#X connect 16 0 36 0; +#X connect 16 0 45 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 21 0 45 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 27 0 45 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; +#X connect 43 0 18 0; +#X connect 44 0 36 0; +#X connect 45 1 43 0; +#X connect 45 2 44 0; diff --git a/pix_opencv_contours.cpp b/pix_opencv_contours.cc index 0632c57..842cbf2 100644 --- a/pix_opencv_contours.cpp +++ b/pix_opencv_contours.cc @@ -15,7 +15,8 @@ // ///////////////////////////////////////////////////////// // based on code written by Lluis Gomez i Bigorda ( lluisgomez _at_ hangar _dot_ org ) (pix_opencv) -// Template for pix_opencv class +// pix_opencv_contours extract and simplify contours of incomming image +// by Antoine Villeret - 2012 #include "pix_opencv_contours.h" #include <stdio.h> diff --git a/pix_opencv_contours_convexity-help.pd b/pix_opencv_contours_convexity-help.pd index 9204814..e1ddab2 100644 --- a/pix_opencv_contours_convexity-help.pd +++ b/pix_opencv_contours_convexity-help.pd @@ -1,4 +1,4 @@ -#N canvas 231 355 1068 671 10; +#N canvas 229 360 1068 671 10; #X obj 17 217 cnv 15 430 450 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 17 171 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577 diff --git a/pix_opencv_matchshape.cpp b/pix_opencv_matchshape.cc index 75dc910..75dc910 100644 --- a/pix_opencv_matchshape.cpp +++ b/pix_opencv_matchshape.cc |