CS 766 Computer Vision Assignment 1: High Dynamic Range (HDR)Saikat R. Gomes (saikat@cs.wisc.edu) & Stephen Lazzaro (slazzaro@cs.wisc.edu) |
|
|
|
Contents |
Running the CodeThe software implementation was done in Matlab.The code package can be downloaded from here. HDR implementation: The hdr fuctionality is implemented in the hdr folder. Syntax: processHDR( D , L , R_S , R_B , M_S ); where: D: Name of the directory containing the *.info file; ex: '../../Images/imageSet1/ (note: it expects a '/' in the end) L: is a vector containing the smoothing fact (lamda) used to create the hdr format; ex: [ 1 50 100 ] R_S: is a vector containg the saturation factor used in Rienhard's Local and Global Tone mapping; ex [0.6 0.8] R_B: is a vector containg the bightness fatcor used in Rienhard's Global Tone mapping; ex: [0.76 0.92] M_S: is a vector containg the saturation factores used in the matlab tone mapping functions; ex: [1 5 10 50 10] A *.info file is expected in the directory folder (D) in which the first line contains the number of images, and the remaining lines contain the name of each image along with its shutter speed ( see example here). A unique output folder in the form of 'HDR_{$timestamp}' is created in the directory where all the output files are created: Output Files: aveImage.jpg ... created by averaging the pixels of the input files redResponseCurve-{L}.jpg ... red response curve estimated (one for each L value) greenResponseCurve-{L}.jpg ... green response curve estimated (one for each L value) blueResponseCurve-{L}.jpg ... blue response curev estimated (one for each L value) imageHDR-{L}.hdr ... the HDR file formated created (one for each L value) ToneMap-Matlab-{M_S}-{L}.jpg ... tonemapped image using Matlab inbuilt functionality (one for each L & M_S value) ToneMap-Local-{R_S}-{L}.jpg ... tonemapped image using Reinhard's Local Tone Mapping implemented by us. (one for each L & R_S value) ToneMap-Global-{R_S}-{R_B}-{L}.jpg ... tonemapped image using Reinhard's Global Tone Mapping implemented by us. (one for each L, R_S & R_B value) Here is a sample execution output: >> processHDR('../../Images/museumHDR/',[50],[3],[1],[5]); 18:47:38 [INFO] Output dir created at../../Images/museumHDR/HDR_02192014_184737869 18:47:38 [INFO] Creating average image ... 18:47:57 [INFO] Average image created. 18:47:57 [INFO] Loading image data ... 18:47:58 [INFO] Loading image:../../Images/museumHDR/IMG_9495.jpg 18:47:58 [INFO] Loading image:../../Images/museumHDR/IMG_9496.jpg 18:47:58 [INFO] Loading image:../../Images/museumHDR/IMG_9497.jpg 18:48:00 [INFO] Image data loaded. 18:48:00 [INFO] Estimate camera response curve ... 18:48:00 [INFO] Solving SVD ... 18:48:01 [INFO] SVD solved. 18:48:03 [INFO] Camera response curve estimated. 18:48:03 [INFO] Creating HDR file ... 18:48:22 [INFO] HDR file created ... 18:48:22 [INFO] Creating standard tonemap(s) ... 18:48:39 [INFO] Standard tonemap(s) created. 18:48:39 [INFO] Creating Reinhard tonemap(s) ... 18:48:55 [INFO] Reinhard tonemap(s) created. Ward's algorithm implementation: Our Ward's algorithm implementation is located in the WardsAlg folder. Syntax: WardMain(directory); where: directory: Name of the directory containing the images and *.info file. Output Files: (same as above without response curves) Note: Ward's algorithm is run with the parameter values of 3 for the max bit shift (so allowing +-16 pixel differences), and 3 for the tolerance level. These values can be altered within the WardMain function if necessary. This function outputs HDR images for 3 scenarios: one for Ward's standard algorithm without an edge filter, another for Ward's algorithm with an edge filter, and one standard HDR for the purpose of comparison. |
|
|