ColorContrast
Functions
contrast_enhancement.cpp File Reference

Palma-Amestoy et al. method for contrast enhancement and color cast removal. More...

#include <contrast_enhancement.h>
#include <inout.h>

Functions

void fftproduct (fftw_complex *A, fftw_complex *B, fftw_complex *C, int row, int col)
 Multiplication element per element of two images with complex values. More...
 
void transform_polynom_coef (double *poly, double *p, double u1, double u2, double u3, double u4, double u5, double u6, double u7, double u8, double u9)
 Evalution of the first part of the contrast enhancement polinomial aproximation. More...
 
void contrast_enhancement (Image *Im0, double *poly, int type_kernel, double sigma, double alpha, double beta, int verbose)
 Implements the contrast_enhancement algorithm for color images. More...
 

Detailed Description

Palma-Amestoy et al. method for contrast enhancement and color cast removal.

This file implements the contrast enhancement and color cast removal algorithm described in

“A perceptually inspired variational framework for color enhancement” by R. Palma-Amestoy, E. Provenzi, M. Bertalmío,V. Caselles.IEEE Trans. on Pattern Analysis and Machine Intelligence (TPAMI), 2009.

Author
Sira Ferradans and Rodrigo Palma-Amestoy

Function Documentation

void contrast_enhancement ( Image Im0,
double *  poly,
int  type_kernel,
double  sigma,
double  alpha,
double  beta,
int  verbose 
)

Implements the contrast_enhancement algorithm for color images.

Parameters
Im0Original image to be enhanced.
file_outLocation where the result is to be saved.
polyPolynomial coefficient for the contrast function aproximation.
sigmaControl on the amount of local contrast, common valid values are (1,100). The bigger the value the higher the amount of contrast enhancement.
alphaLevel of attachment to grey value.
verboseEnable/Disable verbose mode.

next iteration

void fftproduct ( fftw_complex *  A,
fftw_complex *  B,
fftw_complex *  C,
int  row,
int  col 
)

Multiplication element per element of two images with complex values.

Parameters
ALeft side argument.
BRigth side argument.
CMatrix used to save the multiplication's result.
void transform_polynom_coef ( double *  poly,
double *  p,
double  u1,
double  u2,
double  u3,
double  u4,
double  u5,
double  u6,
double  u7,
double  u8,
double  u9 
)

Evalution of the first part of the contrast enhancement polinomial aproximation.

Parameters
polyPolynomial coefficient array.
pIntermediate estimated polynomial coefficient.
u1...u9Image to be enhanced and its powers from 1 .. 9