To use Eclipse C++ for your opencv related project, there are two key parts in configuration. This post give a very clear instruction.
If you do not know where your opencv files are, open the Terminal and type:
pkg-config --cflags opencv
For instance, that command gave me this output:
So if you check the files under the ‘include folder’:
cv.h cvaux.hpp cxcore.hpp highgui.h
cv.hpp cvwimage.h cxeigen.hpp ml.h
cvaux.h cxcore.h cxmisc.h
If you don’t know where your libraries are (or you are just psychotic and want to make sure the path is fine), type in Terminal:
pkg-config --libs opencv
My output (in case you want to check) was: .. code-block:: bash
-L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
1. Include the right path
2. Put in right liker information(search path and filenames)
the right way to put these files into the linker librarys, you need to strip off the prefix(lib) and suffix(dylib), but you need to keep the version number is there is any. You could include all of them or just few top ones, which really depends on your application.
$ ls /usr/local/lib
really really Awesome post. — A paw detection using Python ndimage.
I have been trying a lot to make the ‘mex’ working on my mac. But a lot of errors such as can’t find the ‘float.h’, although it is there! multiple tries… finally fix this problem today 🙂
I searched a little bit and finally found this link is quite useful. Basically, you have to make some changes of the ‘mexopts.sh’ file. I have Matlab 2012a, and x-code 4 installed. I didn’t try the suggestion of downloading Xcode3, but the following suggestions work. Find the block of ;; maci64, and change MACOSX_DEPLOYMENT_TARGET to ‘10.6’. Also remove -isysroot in CFLAGS and CXXFLAGS (there are two -isysroot). Here’s my final mexopts.sh file.
;; maci64) #---------------------------------------------------------------------------- CC=gcc SDKROOT='/Developer/SDKs/MacOSX10.6.sdk' MACOSX_DEPLOYMENT_TARGET='10.6' ARCHS='x86_64' CFLAGS="-fno-common -no-cpp-precomp -arch $ARCHS -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" CFLAGS="$CFLAGS -fexceptions" CLIBS="$MLIBS" COPTIMFLAGS='-O2 -DNDEBUG' CDEBUGFLAGS='-g' # CLIBS="$CLIBS -lstdc++" CXX=g++ CXXFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch $ARCHS -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" CXXLIBS="$MLIBS -lstdc++" CXXOPTIMFLAGS='-O2 -DNDEBUG' CXXDEBUGFLAGS='-g'
It’s quite interesting when I saw the page of the animal camouflage. I always assume that animal color/pattern are only for preventing themselves being seen by the predators. But I was wrong.
Dazzle Pattern is repeating pattern with high contrast. It is not so useful for hiding but quite useful to confuse the predator when it’s moving (see the figure for Zebra). And I surprisingly found that people have been using this on ship since early 19th. 🙂 This site gives more history information.
Zebra USS West Mahomet in dazzle camouflage, 1918
Here’s some interesting link I found from ‘ IMAGE AND VISUAL REPRESENTATION GROUP IVRG ‘
1. The free book of ‘joy of visual perception‘
2.CVonline: Vision Related Books including Online Books and Book Support Sites
Their algorithm: Radhakrishna Achanta and Sabine Susstrunk, Saliency Detection using Maximum Symmetric Surround, International Conference on Image Processing (ICIP), Hong Kong, September 2010.
is dealing with the problem of “salient regions comprise more than half the pixels of the image, or if the background is complex, the background gets highlighted instead of the salient object. “. Tested on several images, though not working for all cases, but it’s quite a nice saliency detection since it dose avoid some problems by most of the saliency detection — focusing mostly on high frequency, dense edge region.
Also, it seem that a website is built based on their research for automatically cropping image to give the best composition.