iOS OpenCV Sample

circle_ocvRecently I’ve implemented some of the OpenCV functionality in an iOS project. Based on that, I have created a sample project with object recognition and general image processing. The sample project is based around the AbstractOCVViewController class with main image capture and transformation from iOS captured image to OpenCV IplImage object. An AbstractOCVViewController subclass needs to override and implement the didCaptureIplImage: method. The captured and processed IplImage object is passed here as a parameter. After image manipulation using the OpenCV framework, the didFinishProcessingImage: method is called. The method will handle the transformation and presentation of the IplImage in an UIImageView. There are three samples in this project – color circle detection, smile detection and image blur detection so you can try and test OpenCV yourself.

You may check the sample project at my GitHub repo:

Real and threshold images:

  • IMG_0093
  • IMG_0098
  • IMG_0101
  • IMG_0102

If you liked this blog post I’d appreciate if you followed me on Twitter

Related Post

Remember to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someone

7 thoughts on “iOS OpenCV Sample

  1. Hi, i download your example…is very good….i use the smile detection for ios…but when i open the app i have a very slow preview of camera…how i can have a “real time” preview?

  2. Hi,

    I am trying to use white ball detection like golf ball .
    i could get success using color circle secondly app open using front camera but i want to use back camera as well.

  3. hi.. i m trying to detect traffic sign with iPhone as real time project
    any ideas or advices ??
    anyway i already download your code, how to use it?

  4. Hi,

    I have downloaded this demo project. and I am running in Xcode 7.3. but it is showing lots of error.

    Errors are like :
    “cv::_InputArray::_InputArray(cv::Mat const&)”, referenced from:”

    Please help me how to resolve this issue.

Leave a Reply

Your email address will not be published. Required fields are marked *