TRILATERAL FILTER ALGORITHM


Click here to download the Trilateral Filter algorithm implementation for Tone mapping that uses pfstools.

This is an implementation of Choudhuary's Trilateral Filter [7] algorithm. This is an implementation of Choudhury’s Trilateral Filter [10] algorithm. The development started by experimenting with the code supplied with the DVD of the book by Erik Reinhard [2]. You need to have cygwin [4] in windows to run this code. This code requires pfstools. This is an addition to PFSTMO implemented algorithms. There are 5 files in this implementation: tmo_trilateral.cpp, pfstmo_trilateral.cpp, tmo_trilateral.h, lum.h, and memory.h

 DOWNLOAD-LINK for the Source-code from the DVD associated with "High Dynamic Range Imaging" by Erik Reinhard et. al. It has license similar to BSD. To see the license[3], click here.

There are 5 files in this implementation: tmo_trilateral.cpp, pfstmo_trilateral.cpp, tmo_trilateral.h, lum.h, and memory.h.

The following optional parameters are present.

* @brief trilateral filter tone-mapping
*
* @param Y input luminance
* @param L output tonemapped intensities
* @param contrast:- c (default : 5.0)
* @param sigma:- g (default : 21.0)
* @param shift:- t (default: 0.0)
* @param saturation:- s (default: 1.0)
* @verbose:-v
* @help:-h

The following command in cygwin illustrates the use:
pfsin memorial.hdr | ./pfstmo_trilateral.exe | pfsout memorial.png

References and Links

[1] http://dragon.larc.nasa.gov/retinex/background/retpubs.html

[2] http://books.elsevier.com/companions/0125852630/hdri/html/hdri.html
.

[3] www.umsl.edu/~sj550/myweb/lic_retinex_reinhard.htm

[4] http://www.cygwin.com/

[5] http://www.mpi-inf.mpg.de/resources/pfstools/

[6] http://www.mpi-inf.mpg.de/resources/tmo/

[7] http://www.cis.rit.edu/people/faculty/fairchild/PDFs/PAP18.pdf

M.D. Fairchild and G.M. Johnson, "The iCAM framework for image appearance, image differences, and image quality," Journal of Electronic Imaging, 13 126-138 (2004)

[8] http://www.nr.com/

[9] http://www.cis.rit.edu/mcsl/icam/pub/icam_c_code.zip

[10] http://www.cs.northwestern.edu/~jet/Publications/Tumblin_EGSR2003paper.pdf

Choudhury, P., Tumblin, J., "The Trilateral Filter for High Contrast Images and Meshes," Proc. of the Eurographics Symposium on Rendering, Per. H. Christensen and Daniel Cohen eds., pp. 186-196, 2003.

[11] http://www.cs.nott.ac.uk/%7Eqiu/hdri/PG05/PG05.html