Requirements
MacPorts ready
~/.profile ready
Getting the Package
(http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port)
sudo port selfupdate
sudo port install opencv
It will take some time for those installations.
Compiling
http://opencv.willowgarage.com/wiki/CompileOpenCVUsingLinux
1) put
PKG_CONFIG_PATH=/where/you/have/installed/opencv/lib/pkgconfig
export PATH=$PATH:PKG_CONFIG_PATH
in your ~/.profile
2) > source ~/.profile
3) > pkg-config --cflags opencv (should return the include paths to opencv)
4) To compile ur codes
gcc `pkg-config --cflags opencv` `pkg-config --libs opencv` -o my-opencv-prgm my-opencv-prgm.c
This should be it!
No comments:
Post a Comment