Logo Search packages:      
Sourcecode: qtpfsgui version File versions

tmo_reinhard02.cpp File Reference


Detailed Description

Tone map luminance channel using Reinhard02 model.

Implementation courtesy of Erik Reinhard.

This file is a part of Qtpfsgui package. ---------------------------------------------------------------------- Copyright (C) 2003-2007 Grzegorz Krawczyk

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ----------------------------------------------------------------------

Original source code note: Tonemap.c University of Utah / Erik Reinhard / October 2001

File taken from: http://www.cs.utah.edu/~reinhard/cdrom/source.html

Port to PFS tools library by Grzegorz Krawczyk <krawczyk@mpi-sb.mpg.de>

Id
tmo_reinhard02.cpp,v 1.5 2005/12/05 13:03:39 mantiuk Exp

Definition in file tmo_reinhard02.cpp.

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "../../Libpfs/pfs.h"

Go to the source code of this file.

Classes

struct  CVTS
class  TemporalSmoothVariable< T >

Defines

#define ACTIVITY(x, y, i)   ((V1(x,y,i) - V2(x,y,i)) / (((key * pow (2., phi))/(S_I(i)*S_I(i))) + V1(x,y,i)))
#define S_I(i)   (exp (SIGMA_I(i)))
#define SIGMA_I(i)   (sigma_0 + ((double)i/(double)range)*(sigma_1 - sigma_0))
#define V2(x, y, i)   (V1(x,y,i+1))

Typedefs

typedef double COLOR [3]

Functions

void allocate_memory ()
double bessel (double x)
void build_pyramid (double **luminance, int image_width, int image_height)
void clamp_image ()
void clean_pyramid ()
void compute_bessel ()
void copy_luminance ()
void deallocate_memory ()
void dynamic_range ()
double get_maxvalue ()
double kaiserbessel (double x, double y, double M)
double log_average ()
void print_parameter_settings ()
void scale_to_midtone ()
void tmo_reinhard02 (const pfs::Array2D *Y, pfs::Array2D *L, bool use_scales, float key, float phi, int num, int low, int high, bool temporal_coherent)
void tonemap_image ()
double V1 (int x, int y, int level)

Variables

static double alpha = 2.
static TemporalSmoothVariable
< double > 
avg_luminance
static double bbeta
static CVTS cvts = {0, 0}
static COLOR ** image
static double key = 0.18
double ** luminance
static TemporalSmoothVariable
< double > 
max_luminance
static double phi = 8.
int PyramidHeight
static int range = 8
static int scale_high = 43
static int scale_low = 1
static double sigma_0
static double sigma_1
static bool temporal_coherent
static double threshold = 0.05
static int use_border = 0
static int use_scales = 0
static double white = 1e20


Generated by  Doxygen 1.6.0   Back to index