Ask Your Question
2

installation steps opencv-2.4.2 (IOS)

asked 2012-08-06 00:51:27 -0600

Adwa gravatar image

updated 2013-06-07 01:47:32 -0600

Please say to me what steps i should follow for installing 2.4.2 correctly on ios

I downloaded 2.4.2 from here and I have cmake 2.8.8, then i made the following steps (from inside opencv-2.4.2 dirictory):

1- mkdir build

2- cd build

3- sudo cmake -G "Unix Makefiles" ..

4- sudo make -j8

5- sudo make install

RESULTING IN : install path = usr/local , but there were some warnings during building (sudo make -j8)

Then I followed the steps here to link opencv2.4.2 to XCode project

And still the project couldn't see any opencv method

Please any help ?!

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
2

answered 2012-08-08 20:42:59 -0600

Tõnu Samuel gravatar image

updated 2012-08-08 20:44:31 -0600

I do:

mkdir build
cd build
cmake ../OpenCV-2.4.2 -DWITH_QT=YES
make -j4
sudo make install

Mac OSX, Ubuntu Linux all same way and works well.

edit flag offensive delete link more

Comments

Your way and mine, both generated a lot of warnings after the [84%] of "make -j4", but it built with no errors (just warnings) - Is that ordinary ?!

let me tell you my pain exactly,

There is an error appears in the XCode project after linking the generated libraries and just create a Mat object and Run : ignoring file /../../OpenCV-2.4.2WithDebug/MyBuildDebug/lib/libopencv_highgui.2.4.2.dylib, file was built for unsupported file format which is not the architecture being linked (armv7)

Do you know any idea?! Thanks in advance

Adwa gravatar imageAdwa ( 2012-08-09 08:50:34 -0600 )edit
1

answered 2012-08-26 14:16:20 -0600

Adwa gravatar image

There are 2 ways to install and link opencv-2.4.2 to XCode

  1. following the steps mentioned in the question to install, and following this to link XCode. But honestly this way didn't work with me !! it generated an armv7 architecture error !!!

  2. Just an easy, pure way :

    • Download opencv2.framework from opencv.org (it's a prebuilt framework -ready to use directly- )
    • Add it to xcode project as adding any library. if you don't know about that, don't worry :) read the content under the title "Adding the OpenCV Framework" here
    • Add headers >> Follow the steps under the title "Include the OpenCV headers" here
    • Write your test code and Run.

Enjoy :)

edit flag offensive delete link more

Comments

> Download opencv2.framework from opencv.org

where?

LunarDuck gravatar imageLunarDuck ( 2014-09-02 17:51:27 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-08-06 00:51:27 -0600

Seen: 6,358 times

Last updated: Jun 07 '13