Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

saberahul

macrumors 68040
Original poster
Nov 6, 2008
3,651
120
USA
I was hoping someone can walk me step by step with the process. I am in urgent need to integrate OpenCV with xCode however am unable to do so. I am relatively new to the Mac platform so I may be doing something wrong here or there. Here are the details:

I will be programming in C language, not C++. What I want to do is integrate the entire openCV library (all the header files like cv.h and so on) such that when I do the following in xCode, it should run:

//Example: #include <cv.h/openCV.h> //End Example

As of now, I have downloaded the official .dmg file from the willowgarage website (I have also tried downloading the private framework). Upon opening the downloaded folder, all I see are the following files:
  • 3rdparty
  • android
  • cmake_uninstall.cmake.in
  • CMakeLists.txt
  • cvconfig.h.cmake
  • data
  • doc
  • _static
  • _themes
  • acircles_pattern.png
  • check_docs_whitelist.txt
  • check_docs.py
  • CMakeLists.txt
  • conf.py
  • Doxyfile.in
  • haartraining.htm
  • license.txt
  • mymath.sty
  • ocv.py
  • opencv_cheatsheet.pdf
  • opencv_cheatsheet.tex
  • opencv_tutorials.pdf
  • opencv_user.pdf
  • opencv-logo.png
  • opencv-logo2.png
  • opencv.bib
  • opencv.ico
  • opencv.jpg
  • opencv2refman.pdf
  • packaging.txt
  • patch_refman_latex.py
  • pattern_tools
  • pattern.png
  • reformat.py
  • tutorials
  • calib3d
  • core
  • definitions
  • features2d
  • general
  • gpu
  • highgui
  • images
  • imgproc
  • introduction
  • ml
  • objdetect
  • tutorials.rst
  • video
  • user_guide
  • ug_features2d.rst
  • ug_highgui.rst
  • ug_mat.rst
  • user_guide.rst
  • vidsurv
  • include
  • index.rst
  • modules
  • opencv-XXX.pc.cmake.in
  • OpenCV.mk.in
  • opencv.pc.cmake.in
  • OpenCVAndroidProject.cmake
  • OpenCVConfig-version.cmake.in
  • OpenCVConfig.cmake.in
  • OpenCVFindIPP.cmake
  • OpenCVFindLATEX.cmake
  • OpenCVFindOpenEXR.cmake
  • OpenCVFindOpenNI.cmake
  • OpenCVFindPkgConfig.cmake
  • OpenCVFindXimea.cmake
  • OpenCVModule.cmake
  • OpenCVPCHSupport.cmake
  • README
  • samples

Here is where I am confused: how do I configure this so that when I type in the example listed above, xCode will find the OpenCV header files and continue with the program? Currently I get an error that states c.h not found and the build fails. If someone could guide me step by step on how to integrate OpenCV with the latest xCode, it will be very much appreciated.

Thanks in advance.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.