aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlluís gómez i bigordà <lluisbigorda@users.sourceforge.net>2009-09-18 10:34:36 +0000
committerlluís gómez i bigordà <lluisbigorda@users.sourceforge.net>2009-09-18 10:34:36 +0000
commit746a7193a90438e81b497ad90c432bc3f6b30657 (patch)
tree3a81812050eb68b2d13a59d0e7cc6ef0e433f117
parent589b247931bb64edc2e13d19bbf6f4db15e6b9c6 (diff)
added -1 message for lost objects
svn path=/trunk/externals/pix_opencv/; revision=12391
-rw-r--r--COPYING36
-rw-r--r--Makefile8
-rw-r--r--Makefile.in2
-rw-r--r--pix_opencv_contours_boundingrect.cc24
4 files changed, 62 insertions, 8 deletions
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..98efdb1
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,36 @@
+IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+
+By downloading, copying, installing or using the software you agree to this license.
+If you do not agree to this license, do not download, install,
+copy or use the software.
+
+
+ Intel License Agreement
+ For Open Source Computer Vision Library
+
+Copyright (C) 2000, 2001, Intel Corporation, all rights reserved.
+Third party copyrights are property of their respective owners.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistribution's of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistribution's in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ * The name of Intel Corporation may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+This software is provided by the copyright holders and contributors "as is" and
+any express or implied warranties, including, but not limited to, the implied
+warranties of merchantability and fitness for a particular purpose are disclaimed.
+In no event shall the Intel Corporation or contributors be liable for any direct,
+indirect, incidental, special, exemplary, or consequential damages
+(including, but not limited to, procurement of substitute goods or services;
+loss of use, data, or profits; or business interruption) however caused
+and on any theory of liability, whether in contract, strict liability,
+or tort (including negligence or otherwise) arising in any way out of
+the use of this software, even if advised of the possibility of such damage.
diff --git a/Makefile b/Makefile
index 183f7bd..ca52e25 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-PD_DIR = /usr/local/pd
-GEM_DIR = /usr/local/pd/gem
+PD_DIR = /usr/src/pd-svn/trunk/pd
+GEM_DIR = /usr/src/pd-svn/trunk/Gem
GEM_OPENCV_VERSION = 0.2
@@ -27,8 +27,8 @@ 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
-SOURCES_OPT = pix_opencv_surf.cc
+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
+SOURCES_OPT =
all: $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION))
diff --git a/Makefile.in b/Makefile.in
index 42837ab..fb941ec 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -27,7 +27,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
+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
SOURCES_OPT = @SOURCES_OPT@
all: $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION))
diff --git a/pix_opencv_contours_boundingrect.cc b/pix_opencv_contours_boundingrect.cc
index 088c07c..60e9583 100644
--- a/pix_opencv_contours_boundingrect.cc
+++ b/pix_opencv_contours_boundingrect.cc
@@ -105,6 +105,7 @@ void pix_opencv_contours_boundingrect :: processRGBAImage(imageStruct &image)
unsigned char *pixels = image.data;
char tindex[4];
int im = 0; // Indicator of markers.
+ t_atom rlist[5];
if ((this->comp_xsize!=image.xsize)||(this->comp_ysize!=image.ysize)||(!orig)) {
@@ -197,7 +198,6 @@ void pix_opencv_contours_boundingrect :: processRGBAImage(imageStruct &image)
cvDrawContours( orig, contours, CV_RGB(255,255,255), CV_RGB(255,255,255), 0, 1, 8, cvPoint(0,0) );
}
- t_atom rlist[4];
SETFLOAT(&rlist[0], oi);
SETFLOAT(&rlist[1], rect.x);
SETFLOAT(&rlist[2], rect.y);
@@ -219,6 +219,12 @@ void pix_opencv_contours_boundingrect :: processRGBAImage(imageStruct &image)
x_xmark[im] = -1.0;
x_ymark[im] = -1,0;
x_found[im] = x_ftolerance;
+ SETFLOAT(&rlist[0], im);
+ SETFLOAT(&rlist[1], -1.0);
+ SETFLOAT(&rlist[2], -1.0);
+ SETFLOAT(&rlist[3], 0.0);
+ SETFLOAT(&rlist[4], 0.0);
+ outlet_list( m_dataout, 0, 5, rlist );
}
}
@@ -232,6 +238,7 @@ void pix_opencv_contours_boundingrect :: processRGBImage(imageStruct &image)
{
unsigned char *pixels = image.data;
char tindex[4];
+ t_atom rlist[5];
int im = 0; // Indicator of markers.
if ((this->comp_xsize!=image.xsize)||(this->comp_ysize!=image.ysize)||(!rgb)) {
@@ -320,7 +327,6 @@ void pix_opencv_contours_boundingrect :: processRGBImage(imageStruct &image)
cvDrawContours( rgb, contours, CV_RGB(255,255,255), CV_RGB(255,255,255), 0, 1, 8, cvPoint(0,0) );
}
- t_atom rlist[4];
SETFLOAT(&rlist[0], oi);
SETFLOAT(&rlist[1], rect.x);
SETFLOAT(&rlist[2], rect.y);
@@ -342,6 +348,12 @@ void pix_opencv_contours_boundingrect :: processRGBImage(imageStruct &image)
x_xmark[im] = -1.0;
x_ymark[im] = -1,0;
x_found[im] = x_ftolerance;
+ SETFLOAT(&rlist[0], im);
+ SETFLOAT(&rlist[1], -1.0);
+ SETFLOAT(&rlist[2], -1.0);
+ SETFLOAT(&rlist[3], 0.0);
+ SETFLOAT(&rlist[4], 0.0);
+ outlet_list( m_dataout, 0, 5, rlist );
}
}
@@ -358,6 +370,7 @@ void pix_opencv_contours_boundingrect :: processYUVImage(imageStruct &image)
void pix_opencv_contours_boundingrect :: processGrayImage(imageStruct &image)
{
char tindex[4];
+ t_atom rlist[5];
int im = 0; // Indicator of markers.
if ((this->comp_xsize!=image.xsize)||(this->comp_ysize!=image.ysize)||(!orig)) {
@@ -449,7 +462,6 @@ void pix_opencv_contours_boundingrect :: processGrayImage(imageStruct &image)
cvDrawContours( cnt_img, contours, CV_RGB(255,255,255), CV_RGB(255,255,255), 0, 1, 8, cvPoint(0,0) );
}
- t_atom rlist[4];
SETFLOAT(&rlist[0], oi);
SETFLOAT(&rlist[1], rect.x);
SETFLOAT(&rlist[2], rect.y);
@@ -471,6 +483,12 @@ void pix_opencv_contours_boundingrect :: processGrayImage(imageStruct &image)
x_xmark[im] = -1.0;
x_ymark[im] = -1,0;
x_found[im] = x_ftolerance;
+ SETFLOAT(&rlist[0], im);
+ SETFLOAT(&rlist[1], -1.0);
+ SETFLOAT(&rlist[2], -1.0);
+ SETFLOAT(&rlist[3], 0.0);
+ SETFLOAT(&rlist[4], 0.0);
+ outlet_list( m_dataout, 0, 5, rlist );
}
}