在下载了源码之后,对opencv源码进行编译,
cd ~/<your_working_dir>/opencv # the directory should contain CMakeLists.txt, INSTALL etc. mkdir release # create the output directory cd release cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON ..
然后,需要执行
yaourt x264
因为,目前还缺少这 264的库,需要另外安装264的库
make sudo make install
之后
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
cd ~/<your_working_dir>/opencv/samples/c . build_all.sh ./delaunay # try other samples (some of them require a camera) ...
更多的问题可以查看这里:
http://www.christophseibert.de/weblog/en/it/computer-vision/tools/opencv-mac.html