Automatic Color Enhancement
|
ACE automatic color enhancement. More...
Go to the source code of this file.
Functions | |
int | ace_enhance_image_interp (float *u, const float *f, int width, int height, float alpha, const char *omega_string, int num_levels) |
ACE automatic color enhancement using level interpolation. More... | |
int | ace_enhance_image_poly (float *u, const float *f, int width, int height, float alpha, const char *omega_string, int degree) |
ACE automatic color enhancement using a polynomial slope function. More... | |
ACE automatic color enhancement.
Copyright (c) 2012, Pascal Getreuer All rights reserved.
This program is free software: you can redistribute it and/or modify it under, at your option, the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version, or the terms of the simplified BSD license.
You should have received a copy of these licenses along with this program. If not, see http://www.gnu.org/licenses/ and http://www.opensource.org/licenses/bsd-license.html.
Definition in file ace.h.
int ace_enhance_image_interp | ( | float * | u, |
const float * | f, | ||
int | width, | ||
int | height, | ||
float | alpha, | ||
const char * | omega_string, | ||
int | num_levels | ||
) |
ACE automatic color enhancement using level interpolation.
u | the enhanced output image |
f | the input image in planar row-major order |
width,height | image dimensions |
alpha | the slope parameter (>=1), larger implies stronger enhancement |
omega_string | string specifying the spatial weighting function |
num_levels | number of interpolation levels (>=2) |
This routine perform ACE enhancement by computing
for fixed levels L. The are then piecewise linearly interpolated to approximate R. The parameter num_levels
determines the number of L values used. Increasing num_levels
improves quality but increases computation time.
If non-null, parameter omega_string
specifies the spatial weighting function . Valid choices are
If OpenMP is enabled, the main computation loop is parallelized.
int ace_enhance_image_poly | ( | float * | u, |
const float * | f, | ||
int | width, | ||
int | height, | ||
float | alpha, | ||
const char * | omega_string, | ||
int | degree | ||
) |
ACE automatic color enhancement using a polynomial slope function.
u | the enhanced output image |
f | the input image in planar row-major order |
width,height | image dimensions |
alpha | the slope parameter (>=1), larger implies stronger enhancement |
omega_string | string specifying the spatial weighting function |
degree | polynomial degree (can be 3, 5, 7, 9, or 11) |
This routine perform ACE enhancement using the fast O(N log N) algorithm of Bertalmio et al. The slope parameter must be an integer or half-integer between 1 and 8 (1, 1.5, 2, 2.5, ..., 7.5, 8). The slope function is approximated by an -optimal polynomial of degree degree
.
If non-null, parameter omega_string
specifies the spatial weighting function . Valid choices are
If OpenMP is enabled, the main computation loop is parallelized.
note: In the parallel computation, values are summed in a nondeterministic order (i.e., in whichever order threads complete). Due to rounding effects, addition is not exactly associative and the output varies slightly between runs (+/- 1 intensity level).