OpenCV  4.1.0
Open Source Computer Vision
OpenCV iOS Hello

Goal

In this tutorial we will learn how to:

Linking OpenCV iOS

Follow this step by step guide to link OpenCV to iOS.

  1. Create a new XCode project.
  2. Now we need to link opencv2.framework with Xcode. Select the project Navigator in the left hand panel and click on project name.
  3. Under the TARGETS click on Build Phases. Expand Link Binary With Libraries option.
  4. Click on Add others and go to directory where opencv2.framework is located and click open
  5. Now you can start writing your application.
linking_opencv_ios.png

Hello OpenCV iOS Application

Now we will learn how to write a simple Hello World Application in Xcode using OpenCV.

Output

output.png

Changes for XCode5+ and iOS8+

With the newer XCode and iOS versions you need to watch out for some specific details