aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL11
-rw-r--r--Makefile22
-rw-r--r--Makefile.in15
3 files changed, 35 insertions, 13 deletions
diff --git a/INSTALL b/INSTALL
index 1f8d7c4..105806d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,4 @@
-
+updated for Linux on 2012-09-12
get the source version through svn :
@@ -9,13 +9,12 @@ cd pure-data/trunk/externals/pix_opencv
===== GNU/Linux =====
(actually only tested in GNU/Linux Ubuntu)
+this new version requiered OpenCV 2.3, available with apt-get since 12.04
-first install opencv development packages,
-on ubuntu :
+apt-get install libopencv-dev
-apt-get install libcv-dev
-apt-get install libcvaux-dev
-apt-get install libhighgui-dev
+for other systems, you must build the lib from source, see this :
+http://opencv.willowgarage.com/wiki/InstallGuide
get the _SOURCES_ of the pd you are using
and of the GEM that you are loading
diff --git a/Makefile b/Makefile
index 7a77fa4..a48b92b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-PD_DIR = /Software/pd-svn/trunk/pd
-GEM_DIR = /usr/src/gem-0.92-3
+PD_DIR = /home/antoine/pd/pd
+GEM_DIR = /home/antoine/pd/Gem
GEM_OPENCV_VERSION = 0.2
@@ -18,7 +18,9 @@ ifeq ($(UNAME),Linux)
LDFLAGS = -Wl,--export-dynamic -shared
LIBS = `pkg-config --libs opencv`
EXTENSION = pd_linux
- SOURCES_OPT = pix_opencv_surf.cc
+ SOURCES_OPT =
+ #~ OPENCV_VERSION = `pkg-config --modversion opencv`
+ OPENCV_VERSION = 2.3.0
endif
ifeq ($(UNAME),Darwin)
INCLUDES += -I/Library/Frameworks/OpenCV.framework/Headers/ -I/Applications/Pd-extended.app/Contents/Resources/include/pdextended -I/Applications/Pd-extended.app/Contents/Resources/include/
@@ -30,14 +32,15 @@ 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 = 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
-all: $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION))
+all: $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION)) blobtrack
%.$(EXTENSION): %.o
gcc $(LDFLAGS) -o $*.$(EXTENSION) $*.o $(LIBS)
.cc.o:
+ echo .cc.o target
g++ $(CPPFLAGS) $(INCLUDES) -o $*.o -c $*.cc
.c.o:
@@ -52,3 +55,12 @@ clean:
distro: clean all
rm *.o
+
+blobtrack:
+ifeq ( $(OPENCV_VERSION), 2.*.*)
+ g++ $(CPPFLAGS) $(INCLUDES) -o pix_opencv_blobtrack.o -c pix_opencv_blobtrack.cpp
+ g++ $(LDFLAGS) -o pix_opencv_blobtrack.$(EXTENSION) pix_opencv_blobtrack.o $(LIBS)
+ rm pix_opencv_blobtrack.o
+
+template:
+ g++ $(CPPFLAGS) $(INCLUDES) -o pix_opencv_template.o -c pix_opencv_template.cpp
diff --git a/Makefile.in b/Makefile.in
index ef8ad0b..d2ee7d3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -19,6 +19,7 @@ ifeq ($(UNAME),Linux)
LIBS = `pkg-config --libs opencv`
EXTENSION = pd_linux
SOURCES_OPT = @SOURCES_OPT@
+ OPENCV_VERSION = `pkg-config --modversion opencv`
endif
ifeq ($(UNAME),Darwin)
INCLUDES += -I/Library/Frameworks/OpenCV.framework/Headers/ -I/Applications/Pd-extended.app/Contents/Resources/include/pdextended -I/Applications/Pd-extended.app/Contents/Resources/include/
@@ -30,14 +31,15 @@ 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
+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
-all: $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION))
+all: $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION)) blobtrack
%.$(EXTENSION): %.o
gcc $(LDFLAGS) -o $*.$(EXTENSION) $*.o $(LIBS)
.cc.o:
+ echo .cc.o target
g++ $(CPPFLAGS) $(INCLUDES) -o $*.o -c $*.cc
.c.o:
@@ -52,3 +54,12 @@ clean:
distro: clean all
rm *.o
+
+blobtrack:
+ifeq ( $(OPENCV_VERSION), 2.*)
+ g++ $(CPPFLAGS) $(INCLUDES) -o pix_opencv_blobtrack.o -c pix_opencv_blobtrack.cpp
+ g++ $(LDFLAGS) -o pix_opencv_blobtrack.$(EXTENSION) pix_opencv_blobtrack.o $(LIBS)
+ rm pix_opencv_blobtrack.o
+
+template:
+ g++ $(CPPFLAGS) $(INCLUDES) -o pix_opencv_template.o -c pix_opencv_template.cpp