The CImg Library - C++ Template Image Processing Library

What is CImg?

The Library is a small and open-source C++ library for image processing, designed with these properties in mind :

| defines classes and methods to manage images in your own C++ code. You can use to load/save various file formats, access pixel values, display/transform/filter images, draw primitives (text, faces, curves, 3d objects, ...), compute statistics, manage user interactions on images, and so on...
| defines a single image class able to represent datasets having up to 4-dimensions (from 1d scalar signals to 3d hyperspectral volumetric images), with template pixel types (bool,char,int,float,...). It also handles image collections and sequences.
| is self-contained, thread-safe and highly portable. It fully works on different operating systems (Unix,Windows,MacOS X,*BSD,...) and is compatible with various C++ compilers (Visual C++,g++,clang++,icc,...).
| is lightweight. It is made of a single header file CImg.h that must be included in your C++ source. It defines only four different classes, encapsulated in the namespace cimg_library. It can be compiled using a minimal set of standard C++ and system libraries only. No need for exotic or complex dependencies.
| Although not mandatory, can use functionalities of external tools/libraries such as Board, FFMPEG, FFTW3. GraphicsMagick, ImageMagick, Lapack, libcurl, libjpeg, libpng, libtiff, Magick++, OpenEXR OpenCV OpenMP or XMedCon. Moreover, a simple plug-in mechanism allows any user to directly enhance the library capabilities according to his needs.
| is a free, open-source library distributed under the CeCILL-C (close to the GNU LGPL) or CeCILL (compatible with the GNU GPL) licenses. It can be used in commercial applications.

stands for Cool Image : It is easy to use, efficient and is intended to be a very pleasant toolbox to design image processing algorithms in C++. Due to its generic conception, it can cover a wide range of image processing applications.

Book (Fr)

- If you understand French, you may be interested by the nice book we wrote on how to use the Library to develop image processing algorithms, from scratch. In these 318 pages, we review the important concepts of the library and address a wide variety of applications in image processing (Filtering, Mathematical Morphology, Feature Extraction, Segmentation, Multispectral Approaches, 3D Visualization, etc.).

Authors

- David Tschumperlé (project manager)

(Check out his blog)
with the help of many contributors around the world :
Maksim Aizenshtein, Alberto Albiol, Antonio Albiol, Kiko Albiol, Simon Barthelmé, Neil Brown, Haz-Edine Assemlal, Vincent Barra, Wolf Blecher, Romain Blei, Yohan Bentolila, Jerome Boulanger, Pierre Buyssens, Sebastien Coudert, Frederic Devernay, Olivier D'Hondt, François-Xavier Dupé, Gerd von Egidy Eric Fausett, Jean-Marie Favreau, Sebastien Fourey, Alexandre Fournier, Vincent Garcia, David Grimbichler, Jinwei Gu, Jean-Daniel Guyot, Cédric Hammiche, Matt Hanson, Sebastien Hanel, Nicholas Hayes, Michael Holroyd, Christoph Hormann, Hon-Kwok Fung, Werner Jainek, Vo Duc Khanh, Daniel Kondermann, Pierre Kornprobst, Jan W. Krieger, Francois Lauze, Orges Leka, Tony E Lewis, Xie Long, Thomas Martin, Cesar Martinez, Jean Martinot, Arnold Meijster (Center for High Performance Computing and Visualization, University of Groningen/The Netherlands) Nikita Melnichenko, Baptiste Mougel, Julien Morat, Jovana Milutinovich, Guillaume Nee, Adam Newgas, Francisco Oliveira, Andrea Onofri, Renaud Peteri, Martin Petricek, Paolo Prete, Adrien Reboisson, Klaus Schneider, Jakob Schluttig, Jamie Smith, Veronique Souchaud, Konstantin Spirin, Rainer Steffens, David G. Starkweather, Elle Stone, Grzegorz Szwoch, Thierry Thomas, Ulysse Vimont / Anatascope, Yu-En-Yun, Ingo Weyrich, Phillip Wood, Bug Zhao, Haibo Zheng.

Licenses

The Library is an open-source product distributed under two distinct licenses : the library core itself is dual-licensed and can be governed either by the CeCILL-C License (LGPL-like), or the CeCILL License (GPL-compatible). Most of the other package files are distributed under the CeCILL License. Both are open-source licenses, the CeCILL-C being less restrictive than the CeCILL.
The Library source code has been registered to the APP (French Agency for the Protection of Programs) by the INRIA, under registration number IDDN.FR.001.040004.000.S.P.2004.000.21000.

Learn More

- The Tutorial section shows the basic use of classes and functions with a small first code.
- The Screenshots section illustrates some of the different source code examples provided in the package.
- You can look at the quite complete Library presentation slides (.pdf format) which gives more insights on the different library concepts.
- Online web statistics on the website activity are available here.

Quick History

The development of the Library began at the end of 1999, when I started my PhD thesis in the Lab at the Sophia Antipolis. It was designed to help me and my colleagues developing various image processing algorithms, for datasets as simple as 2D scalar images, or as complex as 3D volumes of diffusion tensors. I also used it for courses on image processing I teached at the university. As a result, the Library has been always intended to be compact, easy to install and to use, multi-platform and generic. It provides a lot of basic functions that everyone would like to find in a good C++ image processing framework.
I am now a permanent researcher of the institution, working in the group at the lab in Caen/France. I am still using, maintaining and updating the Library, and will probably do it for the next couple of years.

How to Help?

The Library is an open-source C++ library which is mainly developped during free time. If you enjoy using , you may contribute to the project in different ways. This will motivate me to continue the work.

- You can help to be more widely known, by displaying a CImg Flyer at work, in your lab or school (available in .PDF or .JPEG formats).
- You can report bugs, propose patches or new functionalities, using the forum.
- You can write tutorials or parts of the documentation.
- If you just want to say you've been happy with the library, you can send me a postcard from your place, to the following address :
  David Tschumperlé, GREYC (UMR CNRS 6072), Equipe IMAGE, 6 Bd du Maréchal Juin, 14050 Caen Cedex, FRANCE.
  73 postcards received yet (I still have empty space on my wall ! :) ), from :
  - Comissao Nacional de Energia Nuclear, Rio de Janeiro, Brazil.
  - Universidad Nacional del Litoral, Santa Fe, Argentina.
  - Waikiki's only true resort, Honolulu/Hawaii.
  - Royal Pavilion, Brighton/UK.
  - Cambridge, UK.
  - National Tai-Chung Institute of Technology, Taiwan.
  - Fuzzy Logic Laboratorium Linz-Hagenberg, Linz, Austria.
  - Corte/Corsica.
  - Microsoft Research, Beijing/China.
  - Palermo/Italia.
  - Florida Atlantic University/USA.
  - Ecole Nationale Supérieure des Mines de Saint-Etienne/France.
  - Venice/Italy, from Sebastien/GREYC (Caen/France).
  - Barcelone/Spain, from Jaime.
  - Guadeloupe/France, from Jean-Michel.
  - London/England, from Sebastien/GREYC (Caen/France).
  - Valencia/Spain, from the Research Institute ITEAM of the Unversidad Politecnica.
  - Vienna/Austria, from Sebastien/GREYC (Caen/France).
  - Neuherberg/Germany, from the Institut for Biomathematick und Biometrie.
  - Cabestany/France, from Guy Poizat.
  - Frascati/Italy, from PhotoComiX.
  - Jaca/Spain, from F. Albior.
  - Munich/Germany, from M???? (didn't succeed in reading the name, sorry !).
  - Playa del Carmen/Mexico, from Sebastien/GREYC (Caen/France).
  - Holland, from Vincent/GREYC (Caen/France).
  - Portland/Oregon/USA, from Mahvin.
  - Gibraltar, from Terry Hendicott.
  - Neuchatel/Switzerland, from Corinne Masimann.
  - Foster City/California, from Arkadi Gelfond.
  - Huntsville/Alabama, from Gordon M. Neeley.
  - Biscarosse/France, from Sebastien/GREYC (Caen/France).
  - California/USA, from Benoit Gauzere/GREYC (Caen/France).
  - Puy-de-Dome/France, from Sebastien/GREYC (Caen/France).
  - Portsmouth/United Kingdom, from Sebastien Clediere/Snell Ltd.
  - Helsinki/Finland, from Arto Huotari.
  - Mettlach/Germany, from Werner Meier.
  - Boston/USA, from Dan Cullen.
  - Mantova/Italy, from Mauro Mitrino.
  - Seligenstadt/Germany, from Dr. Rainer Teubner.
  - Hokusai/Japan, from Benoit Gauzere and Francois Lozes.
  - Munchen/Germany, from Alexandru Dulin.
  - Trier/Germany, from Family Hamacher.
  - Ile de Batz/France, from Pierre-Yves.
  - Germany, from Michel Thomas.
  - Vienna/Austria, from Benoit Gauzere.
  - Torquay/Australia, from Pauline van Buren.
  - Lisboa/Portugal, from Patrick Wauters.
  - Hazebrouck/France, from Michael T.
  - USA, from Bill C.
  - EDF/France, from ZondeR.
  - Belgium, from Marc Lis.
  - Roma/Italy, from Patrick Wauters.
  - Germany, from Werner Meier.
  - Germany, from Justin Pletzfeld.
  - New York/USA, from Garry R. Osgood.
  - Italy, from Andrea (coder of PhotoFlow).
  - Sydney/Australia, from Peter Neave.
  - Fort Worth/Texas/USA, from Steve Gillow.
  - Pondicherry/India, from Bruno Steinbach.
  - Pavia/Italy, from Giulio Canevari.
  - Toulouse/France, from David Revoy.
  - Konstanz/Germany, from Sébastien Fourey.
  - Bilbao/Spain, from Patrick Wauters.
  - Haldern/Germany, from Volker Doebel.
  - France, from Powlux.
  - Winnipeg / Canada, from James Jaworski.
  - Newcastle upon tyne / England, from Richard Gledson.
  - Pregonda / Menorca, from Josep Febrer.
  - USA, from Patrick Wauters.
  - Toulon/France, from Cyril Prissette.
  - Bochum/Germany, from Andreas Weissenburger.
  - Portsmouth/USA, from Benjamin Russell.
  - Angers/France, from Bruno Bianchi.
  - Makuhari/Japan, from Hiroyuki Hayashi.
  - Tristan Da Cunha, from Richard Lockwood.
  - Tyrol/Austria, from Marcel.
  - Heidelberg/Germany, from Markus.
  - Jokulsarlon Lagoonl/Iceland, from Patrick Wauters.
  - Argentina, from Amyspark.