Personal tools



Jump to: navigation, search

Milena is the generic C++ library at the heart of the Olena platform for image processing and pattern recognition. The library provides a framework to implement simple, fast, safe, reusable and extensible image processing tool chains. Milena features many ready-to-use image data structures (regular 1D, 2D, 3D images, graph-based images, etc.) and algorithms. Milena's algorithms are built upon classical entities from the image processing field (images, points/sites, domains, neighborhoods, etc.). This design allows image processing developers and practitioners to easily understand, modify, develop and extend new algorithms while retaining the core traits of Milena: genericity and efficiency.


A generic algorithm is defined in an abstract way so that it can be used with a wide varieties of inputs. Such algorithms are written once, and can then be reused with data of many different types. For instance the following (unique) generic segmentation chain algorithm was used to generate the three output images below.

  1. #include <mln/morpho/closing/area.hh>
  2. #include <mln/morpho/watershed/flooding.hh>
  4. template <typename I, typename N, typename L>
  5. mln_ch_value(I, L)
  6. chain(const mln::Image<I>& ima, const mln::Neighborhood<N>& nbh, unsigned lambda, L& nbasins)
  7. {
  8.   mln_concrete(I) c = mln::morpho::closing::area(ima, nbh, lambda);
  9.   mln_ch_value(I, L) s = mln::morpho::watershed::flooding(c, nbh, nbasins);
  10.   return s;
  11. }

Each input must satisfy constraints corresponding to the nature of the data expected by the algorithm. E.g. in the previous algorithm, the argument ima must be an image, and the argument nbh must be neighborhood (compatible with the type of ima).

Input "Classical" image, with 6-connectivity Graph with (distance-based) weighted edges Triangle mesh (weighted with curvature
information), seen as a simplicial 2-complex.
Olena-c6gradi.png Olena-classgradi.png Olena-bunny-holefilled.png
Output Olena-c6wst.png Olena-classwst2b.png Olena-bunny-holefilled-pinv-curv-segm.png


Milena is a C++ library written following a programming paradigm called SCOOP (Static C++ Object-Oriented Programming), combining the power of Object-Oriented Programming (OOP) and Generic Programming (GP), with no run-time cost.

In addition, the paradigm allow users to provide additional definitions of algorithms known to be faster (or using less memory) on certain classes of input types, depending on their properties (e.g., an array-based container, a fixed-size neighborhood, etc.). This mechanism is more powerful than just overloading or inclusion polymorphism, and is akin to concept-based overloading.

For more information on SCOOP, see burrus.03.mpool and geraud.08.mpool.