简体   繁体   English

在Lion OS 10.7.4 Xcode 4.3.2上安装openCV

[英]Installing openCV on Lion OS 10.7.4 Xcode 4.3.2

I'm trying to install openCV on university's iMac, 我正在尝试在大学的iMac上安装openCV,

but the problem is our university's network is so strict. 但是问题是我们大学的网络太严格了。

and I couldn't install openCV using MacPorts. 而且我无法使用MacPorts安装openCV。

I tried google to look for a way to install but it all failed 我尝试谷歌寻找一种安装方法,但都失败了

i guess because it is kind of old ways and because my network is so strict. 我猜是因为这是一种古老的方法,而且因为我的网络太严格了。

So if anybody knows a way that I can download a ready framework with how to use it inside 因此,如果有人知道我可以下载准备好的框架以及如何在内部使用它的方式

Xcode. Xcode。 or at least a framework with how to install it to work with Xcode. 至少是一个框架,说明如何安装它以与Xcode一起使用。 or a way to download from the source and compile it then install it in Xcode please. 或一种从源代码下载并进行编译然后将其安装在Xcode中的方法。

Because I tried the cmake way and I still have no luck to get it work. 因为我尝试了cmake方式,但我仍然没有运气来使它起作用。

thanks in advance. 提前致谢。


sources I used: 我使用的来源:

http://salemsayed.me/?p=240 http://salemsayed.me/?p=240

http://opencv.willowgarage.com/wiki/InstallGuide http://opencv.willowgarage.com/wiki/InstallGuide

http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port

http://www.ient.rwth-aachen.de/cms/software/opencv/ http://www.ient.rwth-aachen.de/cms/software/opencv/

I'm using Lion + Xcode 4.x branch, with OpenCV svn trunk. 我正在使用Lion + Xcode 4.x分支和OpenCV svn中继。 Everything works fine. 一切正常。 You have to install cmake first, then get the code from the svn following the instructions at http://code.opencv.org . 您必须先安装cmake ,然后按照http://code.opencv.org上的说明从svn获取代码。 The compilation process worked fine for me for all the core modules + the Qt module + the GPU module + TBB acceleration. 对于所有核心模块+ Qt模块+ GPU模块+ TBB加速,编译过程对我来说都很好。

The instructions are the same as the Linux platform. 这些说明与Linux平台相同。 After setting up cmake configuration in a terminal (using ccmake for a more interactive tool), I set the architecture to x86_64 (on my MBP Core 2 Duo), the target directory to /usr/local/ (the default), and I have Intel TBB installed in /usr/local/ . 在终端中设置cmake配置(使用ccmake作为更具交互性的工具)之后,我将架构设置为x86_64 (在我的MBP Core 2 Duo上),目标目录设置为/usr/local/ (默认设置),英特尔TBB安装在/usr/local/

Cmake generates the makefiles for you, so you just have to type make -j2 to compile, then sudo make install . Cmake会为您生成makefile,因此只需键入make -j2进行编译,然后使用sudo make install If you're working on a workstation, then you have more CPU power, and you can replace the value 2 by more, eg 8. 如果您在工作站上工作,那么您将拥有更多的CPU能力,并且可以将值2替换为更多,例如8。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM