• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            逛奔的蝸牛

            我不聰明,但我會很努力

               ::  :: 新隨筆 ::  ::  :: 管理 ::
            http://sites.google.com/site/michaelsafyan/setup-guide/mac-os-x-10-6-snow-leopard
            1. 安裝MacPort: 下載Download MacPorts的dmg,直接安裝
            2. Install PkgConfig using MacPorts: sudo port install pkgconfig
            3. Install CMake using MacPorts:: sudo port install cmake
            4. Configure PKG_CONFIG_PATH: 
            export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig
            export PKG_CONFIG_PATH=~/.local/lib/pkgconfig:/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH
            echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> ~/.profile
            在安裝cmake時要注意,因為在Snow Leopard 10.6.4中因為JDK已經升級過了,在sudo port install cmake時會提示錯誤,解決方法:

            I am in a different position with respect to this fix. I had installed cmake 2.8.2_3 before the Apple Java update. After the Apple Java update, the cmake upgrade from 2.8.2_3 to 2.8.2_4 failed saying that I needed to install Java from Apple, which was already installed. As far as I can tell, the Apple update to Java 1.6.0_22 did not properly update the header path. In the updated version the header path leads to a dead end. I was able to fix this by doing the following.

            1) Create directory

            /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Headers

            2) Copy entire contents of directory

            /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers

            to directory

            /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Headers

            After this fix the upgrade to cmake 2.8.2_4 worked. However, if the macports cmake could be made to look for the Java headers in /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers this would resolve an existing problem.

            From: https://trac.macports.org/ticket/26934


            5. 最終大戲來了,安裝OpenCV: http://sunny.in.th/2010/04/27/installing-opencv-21-on-snow-leopard.html

            Installing OpenCV 2.1 on Snow Leopard has become quite easy at least easier than 2.0. Version 2.1 can now be compiled as 64-bit library.

            Before version 2.1 OpenCV used Carbon which is the old GUI interface for Mac OS. Carbon supports only 32-bit and has been deprecated by Apple. The new GUI interface for Mac OS is Cocoa. With Snow Leopard being a 64-bit kernel it would be nice if we could compile OpenCV as a 64-bit library and not not 32-bit just because of Carbon. Thanks to the OpenCV team they have added Cocoa support in version 2.1.

            To install OpenCV check out the code from the svn repository and compile it.

            $ svn co https://code.ros.org/svn/opencv/trunk/opencv
            $ cd opencv
            $ mkdir build 
            $ cd build 
            $ cmake .. 
            

            Configure the make by

            $ ccmake .
            

            If you want you can build the samples as well.

            ccmake

            Press c to configure, followed by g to generate. Next build and install OpenCV by

            $ make -j8
            $ sudo make install
            

            That’s it!!! Simple right.

            If you want to use Python with OpenCV there’s a little more that needs to be done. By default OpenCV copies the shared object file required by the Python interface to /usr/local/lib/python2.6/site-packages/cv.so which is not under Python path. Add the following line to your .bashrc or .bash_profile

            PYTHONPATH=/usr/local/lib/python2.6/site-packages/cv.so:$PYTHONPATH
            

            Trying running some C samples which are in /usr/local/share/opencv/samples/c/. The Python samples at/usr/local/share/opencv/samples/python/ doesn’t work since they are based on the old SWIG-Python interface. Try running the sample Python code which is in the opencv directory that was checked out from subversion. It’s insidesamples/python.

             

            posted on 2010-10-30 16:05 逛奔的蝸牛 閱讀(809) 評論(0)  編輯 收藏 引用 所屬分類: C/C++
            久久久无码精品亚洲日韩蜜臀浪潮| 久久久久久免费一区二区三区| 久久99国产亚洲高清观看首页| 91精品国产高清久久久久久91| 久久青青草原精品国产软件| 欧美va久久久噜噜噜久久| 国产精品成人久久久久三级午夜电影 | 亚洲精品国精品久久99热一| 久久久精品一区二区三区| 久久久久亚洲AV无码专区桃色 | 国产免费福利体检区久久| 亚洲性久久久影院| 久久久久久久综合综合狠狠| 久久精品国产亚洲AV香蕉| 久久国产成人午夜AV影院| 99久久综合国产精品二区| 欧美激情一区二区久久久| 久久综合狠狠综合久久97色| 日韩乱码人妻无码中文字幕久久| 国产精品九九久久免费视频| 久久久久久久人妻无码中文字幕爆| 人人狠狠综合久久亚洲| 久久这里有精品| 久久AV无码精品人妻糸列| 久久婷婷人人澡人人爽人人爱| 久久夜色精品国产亚洲| 色综合久久久久综合体桃花网| 久久亚洲精品国产亚洲老地址| 久久se精品一区精品二区国产| 国产精品久久久久久久久| 国产成人无码精品久久久免费| 奇米影视7777久久精品| 中文字幕精品无码久久久久久3D日动漫 | 国产伊人久久| 99久久国产综合精品网成人影院 | 国产精品无码久久四虎| 免费国产99久久久香蕉| 热久久这里只有精品| 72种姿势欧美久久久久大黄蕉| 久久w5ww成w人免费| 999久久久无码国产精品|