The ReinhardLocalOperator class is an implementation of Erik Reinhard's local tone mapping operator. More...
Public Slots | |
void | updateKeyValue (int value) |
void | updateSharpening (int value) |
void | toneMap () |
Public Member Functions | |
virtual void | setupUi (QWidget *widget) |
virtual const HdrImage * | getToneMappedImage () const |
virtual void | setImage (const HdrImage *image) |
virtual QString | name () const |
Private Member Functions | |
fftw_complex * | convolveFft (fftw_complex *f1, fftw_complex *f2) |
Private Attributes | |
Ui::ReinhardLocalOperator | ui |
const HdrImage * | inputImage |
HdrImage * | outputImage |
int | width |
int | height |
double | avLum |
double | keyValue |
double | sharpening |
QString | msg |
fftw_complex * | responses [9] |
The ReinhardLocalOperator class is an implementation of Erik Reinhard's local tone mapping operator.
This class implements ToneMappingOperator interface.
FFTW library is used to calculate convolutions efficiently.
Definition at line 28 of file ReinhardLocalOperator.h.
fftw_complex * ReinhardLocalOperator::convolveFft | ( | fftw_complex * | f1, |
fftw_complex * | f2 | ||
) | [private] |
Computes the convolution of f1 by f2 in the Fourier domain. A convolution in the Fourier domain is actually a complex multiplication.
Definition at line 256 of file ReinhardLocalOperator.cpp.
const HdrImage * ReinhardLocalOperator::getToneMappedImage | ( | ) | const [virtual] |
Returns a constant pointer to the tone mapped image.
Implements ToneMappingOperator.
Definition at line 80 of file ReinhardLocalOperator.cpp.
QString ReinhardLocalOperator::name | ( | ) | const [virtual] |
Returns the operator name: Reinhard Local Operator.
Implements ToneMappingOperator.
Definition at line 64 of file ReinhardLocalOperator.cpp.
void ReinhardLocalOperator::setImage | ( | const HdrImage * | _inputImage ) | [virtual] |
Sets the image to be tone mapped.
This function also initializes the operator by computing :
and then calls toneMap().
For improved efficiency, the convolutions are computed in the Fourier domain.
Implements ToneMappingOperator.
Definition at line 98 of file ReinhardLocalOperator.cpp.
void ReinhardLocalOperator::setupUi | ( | QWidget * | widget ) | [virtual] |
Sets up the user interface inside widget.
Implements ToneMappingOperator.
Definition at line 69 of file ReinhardLocalOperator.cpp.
void ReinhardLocalOperator::toneMap | ( | ) | [slot] |
Tone maps the image.
This function emit imageUpdated() when tone mapping is finished.
Definition at line 273 of file ReinhardLocalOperator.cpp.
void ReinhardLocalOperator::updateKeyValue | ( | int | value ) | [slot] |
Reads the key value from the user interface.
This function is typically called when the key value slider is moved.
Definition at line 318 of file ReinhardLocalOperator.cpp.
void ReinhardLocalOperator::updateSharpening | ( | int | value ) | [slot] |
Reads the sharpening parameter from the user interface.
This function is typically called when the sharpening parameter slider is moved.
Definition at line 329 of file ReinhardLocalOperator.cpp.