RETINEX ALGORITHM


Click here to download the Rehman Retinex algorithm implementation for Tone mapping that uses pfstools.

This is an implementation of Rehman Retinex[1] algorithm. This is a modified version of the retinex supplied with the DVD of the book by Erik Reinhard[2]. Unlike Reinhard's code, this code avoids using FFT libraries. Instead, it employs approximate calculations. You need to have cygwin[4] in windows to run this code. This code requires pfstools. This is an addition to PFSTMO implemented algorithms.

 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 3 files in this implementation: tmo_retinex.cpp, pfstmo_retinex.cpp and tmo_retinex.h.

The following optional parameters are present.

* @param Y :input luminance
* @param L :output tonemapped intensities
* @param num (range) :-r number of scales to use in computation (default: 6 )
* @param low :-l size in pixels of smallest scale (default: 2 )
* @param high :-u size in pixels of largest scale (default: 64)
* @param wfactor :-w (Default:1.0)
* @param sfactor :-f (Default:0.4)
* @param saturation :-t (Default:0.7)
* @verbose :-v
* @help :-h

The following command in cygwin illustrates the use:
pfsin memorial.hdr | ./pfstmo_retinex.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