Image processing library in C++


You open the project $${POPULATIONPATH}/population.pro. You compile this project and start to code in the main.cpp file (see First step).

Shared library

Or you create a shared library by commenting this line in $${POPULATIONPATH}/population.pro


You compile it that generates the file population.dll (.so for linux) in the directory $${POPULATIONPATH}/lib .

To load this library in your program, you create a project file (.pro) containing these following lines:

SOURCES += main.cpp # the main file of your project (you have to create it)
POPULATIONPATH=/home/vincent/DEV2/Population #replace by yours
LIBS+=-L$${POPULATIONPATH}/lib # the path where the dynamic shared library is located for the linking
LIBS += -lpopulation

You build and run this project. Now you can start to code in the main.cpp file (see First step). For instance,

using namespace pop;//Population namespace
int main(){
Mat2F64 m(2,2);// a 2d matrix with two rows and two columns
std::cout<<m<<std::endl;//#display in console
m.display();//#display in windows

Activate modules

Of course, you can activate third party modules (VLC, openmp) by uncommented lines in populationconfig.pri file. For instance for openmp,

CONFIG += HAVE_OPENMP #openmp optimization working for many algorithms (a must have for 3d images or real time)

open CMakeLists.txt

Thanks to qtcreator, you can also open CMakeLists.txt for people familiar with cmake.