Digital Camera Workflow for HDR images using a model of retinal processing 
Written by Daniel Tamburrino, David Alleysson and Laurence Meylan
Copyright (C) 2007-2008 Laboratory of Audiovisual Communications (LCAV), 
Ecole Polytechnique Federale de Lausanne (EPFL), 
CH-1015 Lausanne, Switzerland 
 
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 software 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 
(enclosed in the file GPL). 

Instructions:
To run the algorithm, open and modify the file 'runHDRCFA.m'

The full workflow requires raw data from a Canon 350D camera. 
.CR2 files must be converted to 16-bit TIFF files using dcraw with the following options: dcraw -v -T -D -4 ImageName
Make sure the image is not rotated (landscape)
Put all tiff images in a folder and create a 'texp.mat' containing a vector of camera exposition time. It is needed to combine the files to HDR. 
The white-balanced HDR CFA image is then saved in the 'makeHDR_out.mat file'
Note that selecting the gray area in the white-balancing process is a critical step and may induce bad results if done improperly.

It is possible to run the tone mapping algorithm alone on .hdr .jpg .tiff .crw images

Results are saved in the 'results' folder

Last modification: February 15, 2008.