OpenCV + Objective-C

Discussion in 'Mac Programming' started by beon, Dec 17, 2008.

  1. beon macrumors newbie

    Joined:
    Sep 25, 2008
    Location:
    LA CA
    #1
    So, when it comes to using the OpenCV framework (available here) in Objective-C, THIS guy says:
    Well, that blows my mind, 'cause I can't seem to get it up and running. I add the framework, add a build step to my project target to copy the private framework files... but my compiler balks at the line
    Code:
    #import "highgui.h"
    telling me
    Code:
    error: highgui.h: No such file or directory
    Which makes me feel like a n00b, which, when it comes to OpenCV, is the truth.

    Do any of you out there in MacRumors-Land have any tips, or better yet, any Objective-C code that uses OpenCV?

    I'd be real happy, if so...

    Much respect,

    beOn
     
  2. Sayer macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX
    #2
    Typically for frameworks you do:

    Code:
    #import <FrameworkName/HeaderName.h>
     
  3. beon thread starter macrumors newbie

    Joined:
    Sep 25, 2008
    Location:
    LA CA
    #3
  4. IntuitiveWorkz macrumors newbie

    Joined:
    Feb 4, 2009
    #4
    Do you have an example of how you installed opencv?

    I'm getting the same error you did but I am using <headername/headerfile.h>

    Any thoughts?

    Thanks
     
  5. wittegijt macrumors member

    Joined:
    Feb 18, 2007
    Location:
    Eindhoven
    #5
    There is not much installing it, just add it to your xcode project and add a 'Copy files' buildstep to copy the framework in your app bundle. Since this is a private framework, you can't use it in command line apps.

    Wittegijt.
     

Share This Page