Mac does come with OpenGL and GLUT preinstalled, But when it comes to Image processing libraries , they rely on mac specific libraries. Since my project requires a cross platform structure, i had ignore the preinstalled libraries and search for cross platform libraries. When it comes to Image Procession the most popular library is OpenCV by intel
OpenCV
OpenCV is very popular and it is has the similar features of image processing as Matlab Image Processing toolbox. Installation of OpenCV is pretty straight forward. There are few binary available in the net , but most of which work only for the sample program attached in the binary. So its better to compile the framework from the source.
Installation:
Step 1: Download the Source from sourceforge
Step 2: Extract the package
Step 3: Remove the spaces present in the extracted folder name (ie rename the folder to some simple name , I use OpenCVsrc)
Step 4:Open Terminal and go to path where the OpenCV is extracted
>cd <path>/OpenCVsrc
then run the shell script
>./make_frameworks.sh
Step 5: Once this is done , a new folder is created under OpenCVsrc with the name OpenCV.framework. Copy this to the framework directory.This directory is under /Library/Frameworks.
And now the framework is available under xcode frameworks to add and compile. OpenCV for mac is available only in i386 architecture. So the architecture in Xcode needs to be changed before compilation. An alternative method to install OpenCV is to use cmake.
CImg
CImg is a opensource Library which provides simple classes and methods to Load/save various file formats, access pixel values, display, resize/rotate/mirror/filter and draw primitives. There are loads of classes , which makes programming with cImg easier. Buts its not as powerful as OpenCV.
CImg needs no installation, just needs ImageMagick to run. Image magick takes care of the behind the scene operations on CImg.
CImg can be downloaded , the header file can be directly used to in programs. No compilation necessary.
Program Compilation
>g++ -o <Executable name> <Program name> -O2 -L/usr/X11R6/lib -lm -lpthread -lX11
ImageMagick
Image Magic, another opensource image processing library . This is required by CImg for compilation. This has variety of features like
Format conversion, Transform , Resize , Transparency, Draw, Animation , Special effects etc.
The installation is as follows
Step 1: Download the Binaries from imagemagick or from the ftp site
Step 2:Create (or choose) a directory to install the package into and change to that directory, for example:
$magick> cd $HOME
$magick> tar xvfz ImageMagick-x86_64-apple-darwin10.2.0.tar.gz
$magick> export MAGICK_HOME=”$HOME/ImageMagick-6.5.8″
$magick> export PATH=”$MAGICK_HOME/bin:$PATH”
$magick> export DYLD_LIBRARY_PATH=”$MAGICK_HOME/lib”
$magick> convert logo: logo.gif$magick> identify logo.gif$magick> display logo.gif
g++ -o <Executable Name> <Program Name> `Magick++-config –cppflags –cxxflags –ldflags –libs`
OpenCV is in i386 architecture while CImg and ImageMagick are in x86 architecture. OpenCV is dependent on third party libraries like libjpeg etc for handling various file formats, so have a backup of the libraries before modifying these libraries.
Reference:
There was a lot of expectation for this OS , as its making in competetion with the MS windows 7. So was eager to see what it hold and started with started up the DVD. Well i was disappointed with this build.