PICCANTE
0.4
The hottest HDR imaging library!
|
PICCANTE is a C++11 image processing library aimed to provide structures and functionalities for enabling both High Dynamic Range (HDR) and standard imaging.
To use PICCANTE simply set the wanted options and include "piccante.hpp"
The options are set with a #define
and are:
PIC_DEBUG
used for debugging; it mostly enables some printf messages; i.e. for warning when a computation succeeds or fails. PIC_DISABLE_OPENGL
disables the OpenGL support. PIC_ENABLE_OPEN_EXR
enables the support for the OpenEXR library. This may be useful to have in the case .exr images are used. Note that you need to manually install OpenEXR on your developing maching in order to enable this flag. PIC_DISABLE_TINY_EXR
disables the support for the reading EXR files using TinyEXR library (https://github.com/syoyo/tinyexr). This may be useful to have in the case .exr images are used. Note that TinyEXR is already bundled into Piccante (include/externals). PIC_DISABLE_STB
disables the use of STB for reading/writing PNG and JPEG files (https://github.com/nothings/stb). If it is not defined, picccante.hpp searchs for STB in "../../stb" PIC_DISABLE_STB_LOCAL
disables the use of local STB (i.e., placed in "../../stb")Note that when using Eigen types and standard containters, if you do not align containters, a good practice is to enable the following #define:
EIGEN_DONT_VECTORIZE
EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT
If you want to use your Eigen version you need to the add the following #define:
PIC_EIGEN_NOT_BUNDLED
PICCANTE is a modular library with different modules. The main classes are pic::Image and pic::Histogram.
pic::Image
is the base class for managing an image. Pixels are stored in an array of interleaved channels float values; i.e. pic::Image::data. Pixels are stored as float values, because the library is meant mostly for accurate and HDR imaging processing. This class provides standard functions for extracting image statistics (e.g. maximum value, minimum value, mean value, etc.), image operators (e.g. add, sub, mul, div, etc.) and memory management functions (e.g. allocation, cloning, etc.). Note that this class supports multi-channels (e.g. alpha channel) and temporal/volumetric images. It also provides an I/O interface for reading different file formats (ppm, pgm, pbm, bmp, tga, hdr, pfm, etc.) natively in Piccante and through other optional external libraries (e.g. OpenEXR and QT). pic::Histogram
is a class for creating, managing, and processing LDR/HDR image histograms.The main class of this module is pic::Filter. This is a base class for managing a filter; it provides mechanisms for multi-threading, memory allocation, and so on. Typically, a filter in PICCANTE can have multiple pic::Image images as input, imgIn, and a single output, imgOut. Many image filters are implemented in PICCANTE susch as: linear filters (e.g. Gaussian, gradient based, DCT, etc.), non-linear filters (e.g. bilateral, anisotropic diffusion, guided, median, etc.), and image transforms (e.g. warping).
This module contains high-level imaging functionalities such as Laplacian/Gaussian pyramids, Push-pull, a simple Poisson solver, SuperPixels (SLIC), a simple gradient based demosacing method, live-wire counturing, Grow-Cut segmentation, etc. This module provides classes and functions for HDR imaging such as a class for merging LDR images at different exposures, a class for estimating a camera response function (CRF), etc.
This module provides classes and methods for editing, processing and converting colors. Supported color spaces:
For example, the class pic::Color3 provides a basic type for three color components representations. This can be useful for some applications such as a 3D renderer.
This module provides functions for reading and writing images natively in different file formats such as:
BMP:
Windows bitmap file; 24-bit color images are only supported. HDR:
Greg Ward's RGBE format. PGM:
Portable Gray Map images; greyscale images. PPM:
Portable Pixel Map images; color images. PFM:
Portable Float Map images; HDR color images. TGA:
targa file; 24-bit color images are only supported. TMP:
a dump of the pic::Image data. VOL:
a volumetric format for rendering; 32-bit per voxel.The module provides an interface for OpenEXR, but it requires either the linking with the OpenEXR library (see the official website) or the use of TinyEXR (see the official website):
EXR:
ILM's OpenEXR format; HDR color images at 16-bit per component.In addition, the module provides an interface for STB, which is a library for reading/writing LDR images. This library is required for reading/writing JPEG and PNG files. This can be found at its official website.
This module provides classic objective metrics for measuring differences in images. Several metrics are provided such as: PSNR, mPSNR (for HDR images), TMQI (for tone mapped images), SSIM, RMSE, logRMSE (for HDR images), maximum error, relative error, etc. This metrics can be applied to HDR images using PU encoding.
This module provides structures and functions for generating points' set in n-dimensions using different distributions such as: random, stratified random, regular, Poisson-disk, etc. Points generated with such distributions may be useful for filtering algorithms.
This module provides methods for sampling 2D and 3D images using different filters such as: nearest neighbors filter, bilinear filter, bi-cubic filter, Gaussian filter, etc.
This module provides tone mapping operators (TMOs) for reducing the dynamic range in HDR images. Several TMOs are present such as: Ward Histogram Adjustment, Reinhard Photographic Tone Reproduction Operator, Lischinski Improved Photographic Tone Reproduction Operator, Drago TMO, Banterle Hybrid TMO, Schlick TMO, Tumblin TMO, Ward Global TMO, Raman TMO, Durand and Dorsey TMO, etc.
This module provides classes and functions for extracting 2D features from 2D images, and matching the extracted features. This may be useful for aligning images for different tasks such as: HDR exposures stack alignment, generation of panoramas, etc. Different features can be extracted and matched:
Corners
(Key-point): SUSAN, Harris' method, and FAST. Edges:
Canny's method, and Ward's MTB. Key-point
descriptors: BRIEF, ORB, and LUCID.This module provides classes and functions for Computer Vision tasks such as checker board extraction, computation of the Essential matrix, computation of the Fundamental Matrix, estimation of homographies, and triangulation.
This module provides GPU acceleration for some functionalities of PICCANTE through OpenGL. In particular, the module uses OpenGL 4.0 Core profile only, and it is independent from OpenGL loading extensions libraries; users are free to use their favourite ones. Note that when using OpenGL and QT together; QT will load OpenGL functions by default in order to avoid clashes. In the examples (folder “examples”), we generated .h and .c files for loading OpenGL extensions using glLoadGen. This is meant for learning purposes only; we do not want to force users to use it; e.g. GLEW or other libraries can be employed instead.
This module provides different utilies for manipulating strings, arrays, indexed arrays, math functions, 2D arrays, vectors, etc.