ColorContrast
|
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... | |
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.
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.
Im0 | Original image to be enhanced. |
file_out | Location where the result is to be saved. |
poly | Polynomial coefficient for the contrast function aproximation. |
sigma | Control on the amount of local contrast, common valid values are (1,100). The bigger the value the higher the amount of contrast enhancement. |
alpha | Level of attachment to grey value. |
verbose | Enable/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.
A | Left side argument. |
B | Rigth side argument. |
C | Matrix 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.
poly | Polynomial coefficient array. |
p | Intermediate estimated polynomial coefficient. |
u1...u9 | Image to be enhanced and its powers from 1 .. 9 |