macos – 如何在Mac OS 10.6.1(Snow Leopard)中安装OpenCV2.0

我不是一个Unix人,所以我一直试图安装openCV 2.0几天没有成功.

我刚从这个页面下载了opencv库表单sourceforge:

http://sourceforge.net/projects/opencvlibrary/

有没有人知道安装它的确切unix终端命令?

请不要说“去谷歌”,我已经做过了.
我找到了这个:
http://opencv.willowgarage.com/wiki/InstallGuide和这个
http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port
但是解释对于unix初学者来说并不是很好.

安装总是失败.

如果我能够制作一个框架,那就太棒了.
例如来自当前源的OpenCV.framework,所以我可以将它与Xcode和Cocoa一起使用.

谢谢

我做了:

下载了它.
提取它.

cd Downloads/OpenCV-2.0.0
./make_frameworks.sh

并在链接所有.o文件时得到这个.

mv -f .deps/saving.Tpo .deps/saving.Plo
mv -f .deps/logger.Tpo .deps/logger.Plo
mv -f .deps/index_testing.Tpo .deps/index_testing.Plo
libtool: link: (cd .libs/lib_clapack.lax/lib_clapack_floatstore.a && ar x "/Users/nacho4d/Downloads/OpenCV-2.0.0 3/build_i386/3rdparty/./.libs/lib_clapack_floatstore.a")
../libtool: line 961: cd: .libs/lib_clapack.lax/lib_clapack_floatstore.a: No such file or directory
make[2]: *** [lib_clapack.la] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/flann.Tpo .deps/flann.Plo
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Creating universal Framework
=============================================
cp: build_ppc/OpenCV.framework: No such file or directory
lipo: can't open input file: build_ppc/OpenCV.framework/OpenCV (No such file or directory)
Done

在运行shell脚本之前是否需要执行某些操作?

编辑:
对于感兴趣的人,我写了一篇关于如何在Mac上安装和使用OpenCV 2.1.1的帖子:
http://nacho4d-nacho4d.blogspot.com/2010/07/blog-post.html

最佳答案 我在Snow Leopard上编译时遇到了问题,但是可以按照
http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port的说明进行操作

我必须做的唯一修改也是禁用ccmake中的ffmpeg

The GNU autotools methods (make &&
make install) are being outdated.
Volunteers to edit this section?

mkdir opencv/build cd opencv/build
cmake .. ccmake .

If you are on Snow Leopard, hit ‘t’ to
toggle advanced mode. Set
CMAKE_CXX_COMPILER=”/usr/bin/g++-4.0″
and
CMAKE_C_COMPILER=”/usr/bin/gcc-4.0″
and then continue with the following
steps.

Hit ‘c’ to configure. Hit ‘g’ to
generate the config file and exit
ccmake.

make -j8 sudo make install

If you hit the following build error:

/Users/awagner/Developer/opencv2/src/highgui/grfmt_tiff.cpp:292:
error: ‘fmtSignTiffII’ was not
declared in this scope make[2]: *
[src/highgui/CMakeFiles/highgui.dir/grfmt_tiff.o]
Error 1 make07001: *

[src/highgui/CMakeFiles/highgui.dir/all]
Error 2

you can get the build to complete by
commenting out line 292 of
src/highgui/grfmt_tiff.cpp and running
make again. (This probably breaks
something in TIFF export, but the
build at least completes)

点赞