Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This stuff is always hard to figure out in the beginning. </p> <p>You don't need to copy the frameworks into the Frameworks directory because your project is a command line app. You only have an app bundle when you make a Cocoa app. And even in that case you only need to copy the frameworks into the Frameworks directory if you are going to distribute the app to people who don't have OpenCV installed.</p> <blockquote> <p>Note that this is despite the fact that libopencv_core.2.3.dylib is included in the same directory as the executable.</p> </blockquote> <p>Don't copy the library files into your executable file's folder. Just let it link to the files in /opt/local/lib</p> <p>I downloaded your project and was able to get it to run. Here's what I did (using Xcode 4):</p> <ol> <li>Delete the dylib files (and links) from the Edge Display folder</li> <li>Delete the Copy Files build phase that copies the library files</li> <li>Delete the <code>@executable_path/../Frameworks</code> Installation Directory setting</li> <li>Delete everything from the <code>OpenCV Frameworks</code> folder in the Xcode project</li> <li>Select the target, select Build Phases, expand <code>Link Binary With Libraries</code></li> <li>Click the plus button, click Add Other…, type "/opt/local/lib", select <code>libopencv_core.dylib</code> (note I didn't select a file with a version number)</li> <li>Repeat for <code>libopencv_highgui.dylib</code> and <code>libopencv_imgproc.dylib</code> (those are the only libraries your project needs)</li> <li>Set the Deployment Target to OS X 10.6 because that's what I'm using</li> <li>Click Run and get this:</li> </ol> <p><img src="https://i.stack.imgur.com/Fln6c.png" alt="My beautiful edge-detected face"></p> <p>My system is a little different than yours because my OpenCV libraries are installed in /usr/local/lib, but you already have /opt/local/include in the project's Header Search Path so you should be fine.</p> <p>There are some instructions for using the OpenCV libraries in an OS X command-line project on <a href="http://opencv.willowgarage.com/wiki/UsingOpenCVUnderOSX" rel="nofollow noreferrer">the OpenCV Wiki</a> but they're written for Xcode 3. I'll try to add some updated instructions for Xcode 4.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload