Archive for the ‘C++’ Category

Config opencv in EclipseC++

July 26, 2012 Leave a comment

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:

-I/usr/local/include/opencv -I/usr/local/include

So if you check the files under the ‘include folder’:

$ls /usr/local/include/opencv
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)

If check the linker path:you may find that opencv related libs are with prefix of lib, and suffix as x.x.x.dylib

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
QtCore.framework            libjasper.1.0.0.dylib
QtDeclarative.framework            libjasper.1.dylib
QtDesigner.framework            libjasper.a
QtDesignerComponents.framework        libjasper.dylib
QtGui.framework                libjpeg.8.dylib
QtHelp.framework            libjpeg.a
QtMultimedia.framework            libjpeg.dylib
QtNetwork.framework            libopencv_calib3d.2.3.1.dylib
QtOpenGL.framework            libopencv_contrib.2.3.1.dylib
QtScript.framework            libopencv_core.2.3.1.dylib
QtScriptTools.framework            libopencv_features2d.2.3.1.dylib
QtSql.framework                libopencv_flann.2.3.1.dylib
QtSvg.framework                libopencv_gpu.2.3.1.dylib
QtTest.framework            libopencv_highgui.2.3.1.dylib
QtWebKit.framework            libopencv_imgproc.2.3.1.dylib
QtXml.framework                libopencv_legacy.2.3.1.dylib
QtXmlPatterns.framework            libopencv_ml.2.3.1.dylib
gcc                    libopencv_objdetect.2.3.1.dylib
libQtCLucene.4.8.1.dylib        libopencv_ts.2.3.1.dylib
libQtCLucene.4.8.dylib            libopencv_video.2.3.1.dylib
libQtCLucene.4.dylib            libtbb.dylib
libQtCLucene.dylib            libtbbmalloc.dylib
libQtCLucene.prl            libtiff.3.dylib
libQtUiTools.a                libtiff.a
libQtUiTools.prl            libtiff.dylib
libQtUiTools_debug.a            libtiffxx.3.dylib
libQtUiTools_debug.prl            libtiffxx.a
libfrtbegin.a                libtiffxx.dylib
libg2c.0.0.0.dylib            node
libg2c.0.dylib                node_modules
libg2c.a                phonon.framework
libg2c.dylib                pkgconfig                python2.7



Categories: C++, OpenCV

3D Reconstruction (I)

January 25, 2012 Leave a comment

Today’s my first test on Bundler
I didn’t use the source cause there are many packages needed to be set up first, so I follow the recommendation using the binary package (
There are some error I encountered cause I carelessly NOT copying the into the the required path. Well this can be easily fixed by changing/adding the dir-path of to your LD_LIBRARY_PATH. In my case, the LD_LIBRARY_PATH is empty, so I simply create this env-variable.

export LD_LIBRARY_PATH=./bin/

This should be the directory path to the, otherwise you will get error that ‘error while loading shared libraries: cannot open shared object file: No such file or directory’.

So read carefully for the ‘Before you begin’ section. Also, if you are trying older version, e.g. v0.2, you will need to change the BASE_PATH for multiple files, such as the sift.txt. Just check if there is BASE_PATH for your ‘TO-DO’.

Find my gtk version on ubuntu
$ dpkg -s libgtk2.0-0|grep ‘^Version’

For the 3D models in Python



# [Vision] Depth estimation from Blur estimation


#Camera Calibration Toolbox for Matlab

# FIT3D”>

# OpenSceneGraph
Install OpenSceneGraph on Windows:
Install on Ubuntu:
apt-get build-dep openscenegraph
apt-get install openscenegraph