本文介绍了如何在Mac OS 10.6.1(Snow Leopard)中安装OpenCV2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是Unix专家,所以几天来我一直在尝试安装openCV 2.0,但没有成功.我刚刚从此页面下载了opencv库表单sourceforge: http://sourceforge.net/projects/opencvlibrary/有没有人知道确切的unix终端命令来安装它?

I am not a Unix guy, so I have been trying to install openCV 2.0 for days with out success.I just downloaded the opencv library form sourceforge from this page:http://sourceforge.net/projects/opencvlibrary/Does any one know the exact unix terminal commands for installing it?

请不要说去谷歌",我已经这样做了.我找到了这个: http://opencv.willowgarage.com/wiki/InstallGuide 以及此 http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port 但是对于Unix初学者来说,说明不是很好.

please don't say "go to google", I already did.I found this:http://opencv.willowgarage.com/wiki/InstallGuide and thishttp://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Portbut the explanations are not very good for unix beginners.

安装总是总是失败.

如果我能建立一个框架,那就太好了.例如当前来源的OpenCV.framework,因此我可以将其与Xcode一起使用,并且可可更容易.

It would be great if I can make a framework.for example OpenCV.framework from the current source, So I can use it with Xcode, and Cocoa easier.

谢谢

我做到了:

下载了它.提取出来.

downloaded it.extracted it.

cd Downloads/OpenCV-2.0.0
./make_frameworks.sh

,并且在链接所有.o文件时得到了此提示.

and got this when linking all the .o files.

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脚本之前我需要做些什么吗?

Do I need to do something before running the shell script?

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

EDIT:For the interested, I wrote a post on how to install and use OpenCV 2.1.1 on Macs here:http://nacho4d-nacho4d.blogspot.com/2010/07/blog-post.html

推荐答案

好,我已经解决了.实际上,某处存在一个错误,因为如果您的路径中包含空格,shell脚本将失败.

Ok, I just solved it.In fact there is a bug somewhere, because if your path contains a space shell scripts will fail.

例如.

$pwd
/Users/nacho4d/Downloads/OpenCV-2.0.0 3
$./make_frameworks.sh

这将失败,因为当前文件夹"OpenCV-2.0.0 3"具有空格.

this will fail because current folder "OpenCV-2.0.0 3" has a space.

我花了很多时间才意识到这一点.;(

It took me many hours to realize this.;(

致谢

这篇关于如何在Mac OS 10.6.1(Snow Leopard)中安装OpenCV2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 16:03