aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--Makefile.in8
-rw-r--r--pix_opencv-meta.pd7
-rw-r--r--pix_opencv_colorfilt.cc4
-rw-r--r--pix_opencv_contours_convexhull.cc4
5 files changed, 18 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 89c9310..76ab21a 100644
--- a/Makefile
+++ b/Makefile
@@ -15,22 +15,22 @@ UNAME := $(shell uname -s)
ifeq ($(UNAME),Linux)
CPPFLAGS += -DLINUX
INCLUDES += `pkg-config --cflags opencv`
- LDFLAGS = --export-dynamic -shared
+ LDFLAGS = -Wl,--export-dynamic -shared
LIBS = `pkg-config --libs opencv`
EXTENSION = pd_linux
+ SOURCES_OPT = @SOURCES_OPT@
endif
ifeq ($(UNAME),Darwin)
- CPPFLAGS += -DDARWIN
INCLUDES += -I/Library/Frameworks/OpenCV.framework/Headers/ -I/Applications/Pd-extended.app/Contents/Resources/include/pdextended -I/Applications/Pd-extended.app/Contents/Resources/include/
LDFLAGS = -bundle -undefined dynamic_lookup
LIBS = -lm -framework OpenCV
EXTENSION = pd_darwin
+ SOURCES_OPT = pix_opencv_surf.cc
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
-SOURCES_OPT = pix_opencv_surf.cc
all: $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION))
diff --git a/Makefile.in b/Makefile.in
index c3f54e9..c85978c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -15,22 +15,22 @@ UNAME := $(shell uname -s)
ifeq ($(UNAME),Linux)
CPPFLAGS += -DLINUX
INCLUDES += `pkg-config --cflags opencv`
- LDFLAGS = -export_dynamic -shared
+ LDFLAGS = -Wl,--export-dynamic -shared
LIBS = `pkg-config --libs opencv`
EXTENSION = pd_linux
+ SOURCES_OPT = @SOURCES_OPT@
endif
ifeq ($(UNAME),Darwin)
- CPPFLAGS += -DDARWIN
- INCLUDES += -I/Library/Frameworks/OpenCV.framework/Headers/
+ INCLUDES += -I/Library/Frameworks/OpenCV.framework/Headers/ -I/Applications/Pd-extended.app/Contents/Resources/include/pdextended -I/Applications/Pd-extended.app/Contents/Resources/include/
LDFLAGS = -bundle -undefined dynamic_lookup
LIBS = -lm -framework OpenCV
EXTENSION = pd_darwin
+ SOURCES_OPT = pix_opencv_surf.cc
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
-SOURCES_OPT = @SOURCES_OPT@
all: $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION))
diff --git a/pix_opencv-meta.pd b/pix_opencv-meta.pd
new file mode 100644
index 0000000..00affe0
--- /dev/null
+++ b/pix_opencv-meta.pd
@@ -0,0 +1,7 @@
+#N canvas 15 49 200 200 10;
+#N canvas 25 49 420 300 META 1;
+#X text 13 10 NAME pix_opencv;
+#X text 10 30 AUTHOR Yves Degoyon <ydegoyon@gmail.com> and Lluis Gomez i Bigorda <lluisgomez@hangar.org>;
+#X text 10 50 VERSION 0.2-rc5;
+#X text 10 70 LICENSE Intel License Agreement For Open Source Computer Vision Library;
+#X restore 10 10 pd META;
diff --git a/pix_opencv_colorfilt.cc b/pix_opencv_colorfilt.cc
index af13535..d977e0a 100644
--- a/pix_opencv_colorfilt.cc
+++ b/pix_opencv_colorfilt.cc
@@ -118,7 +118,7 @@ void pix_opencv_colorfilt :: processRGBAImage(imageStruct &image)
for( py=0; py<rgba->height; py++ ) {
for( px=0; px<rgba->width; px++ ) {
-#ifdef DARWIN
+#ifdef __APPLE__
g = ((uchar*)(rgba->imageData + rgba->widthStep*(int)py))[(int)px*4];
r = ((uchar*)(rgba->imageData + rgba->widthStep*(int)py))[(int)px*4+1];
b = ((uchar*)(rgba->imageData + rgba->widthStep*(int)py))[(int)px*4+3];
@@ -237,7 +237,7 @@ void pix_opencv_colorfilt :: pickMess (float xcur, float ycur)
if ( ( xcur >= 0. ) && ( xcur <= comp_xsize )
&& ( ycur > 0. ) && ( ycur < comp_ysize ) )
{
-#ifdef DARWIN
+#ifdef __APPLE__
x_colorR = ((uchar*)(brgb->imageData + brgb->widthStep*(int)ycur))[(int)xcur*4+1];
x_colorG = ((uchar*)(brgb->imageData + brgb->widthStep*(int)ycur))[(int)xcur*4+2];
x_colorB = ((uchar*)(brgb->imageData + brgb->widthStep*(int)ycur))[(int)xcur*4+3];
diff --git a/pix_opencv_contours_convexhull.cc b/pix_opencv_contours_convexhull.cc
index ae70e20..ee41e8b 100644
--- a/pix_opencv_contours_convexhull.cc
+++ b/pix_opencv_contours_convexhull.cc
@@ -182,7 +182,7 @@ void pix_opencv_contours_convexhull :: processRGBAImage(imageStruct &image)
// Draw convex hull for current contour.
for(i=0; i<hullsize-1; i++)
{
-#ifdef DARWIN
+#ifdef __APPLE__
cvLine(rgb, PointArray[hull[i]],
PointArray[hull[i+1]],CV_RGB(0,255,0),1, CV_AA, 0 );
#else
@@ -193,7 +193,7 @@ void pix_opencv_contours_convexhull :: processRGBAImage(imageStruct &image)
SETFLOAT(&rlist[j+1], PointArray[hull[i]].y);
j = j + 2;
}
-#ifdef DARWIN
+#ifdef __APPLE__
cvLine(rgb, PointArray[hull[hullsize-1]],
PointArray[hull[0]],CV_RGB(0,255,0),1, CV_AA, 0 );
#else