FireStats is not installed in the database
Laryngitis homøopatiske midler køb propecia edderkop bid retsmidler

OpenCV Mac Programming

Author:nick @ October 22nd, 2008 Leave a Comment

There are currently at least two easy ways to acquire and use OpenCV libraries under OS X. One is to download the OpenCV framework from:

http://www.ient.rwth-aachen.de/~asbach/OpenCV-Private-Framework-1.1.dmg

This provides a set of precompiled, binary, static, universal libraries that can be easily integrated with XCode, and can be used to generate stand-alone mac applications.

The second is to use MacPorts to install OpenCV via “sudo port install opencv” from your terminal after MacPorts has been installed and updated, via “sudo port selfupdate”. This currently intalls OpenCV 1.0 rather than 1.1. This will download and compile source code for opencv and all of its constituent parts. Linking is done dynamically via dynamic libraries (.dylib), and /opt/local/lib must be in your dynamic library path. Some libraries here, e.g. libjpeg, seem to conflict with native OSX libraries, which should be given preference. To avoid these conflicts, use “export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib” rather than using the DYLD_LIBRARY_PATH variable directly.

For the sake of preserving compatility during development, the more unix-like approach of the MacPorts version should be preferred because similar environments can easily be emulated directly on Linux and in Windows via Cygwin. For demo purposes it may be nice to have the ease of access of applications afforded by XCode.

I have noticed some incompatiblity between the code I developed under XCode and the same code compiled through a console using dynamic libraries. I have not yet determined if this is due to the difference between OpenCV 1.0 and 1.1, or something more subtle. I am still investigating. Again for compatibility reasons, it is probably preferable to develop for OpenCV 1.0 unless absolutely necessary. Any software that we develop that for any reason *requries* OpenCV 1.1 should be explicitly documented as such. If the incompatibilities I have noticed are due to something other than version, then we must be very careful to instruct users how to set their OpenCV environments to be compatible with our software.