Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8196155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:23:18+00:00 2026-06-07T05:23:18+00:00

I need to implement SURF algorithm in objc iOS. I have searched on openCV

  • 0

I need to implement SURF algorithm in objc iOS.
I have searched on openCV and also tried to implement following examples

jonmarimba and ishai jaffe

The examples are not working and I need to make any one of them work so atleast I can get relieved that yes SURF can work on iOS as well. I have tried to build from scratch but I am totally FUSED with SHORT CIRCUIT.

I am trying to use openCV 2.4.2 in jonmarimba’s example.

And also trying to use iOS5.1.1 with Xcode 4.3

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:23:20+00:00Added an answer on June 7, 2026 at 5:23 am

    First of all: Go with OpenCVs C++-interface. Objective-C is a strict super set of C, so you can just use it.

    To get a grip on the topic take a look at OpenCVs official docs and the example code about Feature Description.

    The next step is to grab a copy of the current OpenCV version for iOS. As of version 2.4.2 OpenCV has official iOS-support and you just need the opencv2.framework.

    To convert an UIImage to a cv::Mat use this function:

    static UIImage* MatToUIImage(const cv::Mat& m) {
        CV_Assert(m.depth() == CV_8U);
        NSData *data = [NSData dataWithBytes:m.data length:m.elemSize()*m.total()];
        CGColorSpaceRef colorSpace = m.channels() == 1 ?
            CGColorSpaceCreateDeviceGray() : CGColorSpaceCreateDeviceRGB();
        CGDataProviderRef provider = CGDataProviderCreateWithCFData((__bridge CFDataRef)data);
        // Creating CGImage from cv::Mat
        CGImageRef imageRef = CGImageCreate(m.cols, m.cols, m.elemSize1()*8, m.elemSize()*8,
            m.step[0], colorSpace, kCGImageAlphaNoneSkipLast|kCGBitmapByteOrderDefault,
            provider, NULL, false, kCGRenderingIntentDefault);
        UIImage *finalImage = [UIImage imageWithCGImage:imageRef];
        CGImageRelease(imageRef); CGDataProviderRelease(provider);
        CGColorSpaceRelease(colorSpace); return finalImage;
    }
    

    … and vice-versa:

    static void UIImageToMat(const UIImage* image, cv::Mat& m) {
        CGColorSpaceRef colorSpace = CGImageGetColorSpace(image.CGImage);
        CGFloat cols = image.size.width, rows = image.size.height;
        m.create(rows, cols, CV_8UC4); // 8 bits per component, 4 channels
        CGContextRef contextRef = CGBitmapContextCreate(m.data, m.cols, m.rows, 8,
            m.step[0], colorSpace, kCGImageAlphaNoneSkipLast | kCGBitmapByteOrderDefault);
        CGContextDrawImage(contextRef, CGRectMake(0, 0, cols, rows), image.CGImage);
        CGContextRelease(contextRef); CGColorSpaceRelease(colorSpace);
    }
    

    The rest of the work you have to do is plain OpenCV Stuff. So grab you a coffee and start working.

    If you need some “inspiration” take a look at this repo gsoc2012 – /ios/trunk It’s dedicated to OpenCV + iOS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to implement the following: There is a table A which is supposed
I need to implement the following flow in my application: the user can click
I need to implement Gutmann 's algorithm for secure erasing some data in a
I have implemented an openCV applicationWhere I use SURF descriptor. It is working fine
Hi I need implement context help inside my .NET application. I have .chm file
i have big decision tree with many Yes/No questions. i need implement some code
I need to implement Carousel view in Android . I searched in the net
I need to implement RSA algorithm in Java. I've found the best solution using
I need to implement a Diff algorithm in VB.NET to find the changes between
I need to implement Minesweeper solver. I have started to implement rule based agent.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.