{"id":5,"date":"2026-11-12T19:18:43","date_gmt":"2026-11-12T19:18:43","guid":{"rendered":"https:\/\/blog.metu.edu.tr\/e283486\/?p=5"},"modified":"2026-11-12T19:25:36","modified_gmt":"2026-11-12T19:25:36","slug":"high-dynamic-range-imaging-hw-1-blog","status":"publish","type":"post","link":"https:\/\/blog.metu.edu.tr\/e283486\/2026\/11\/12\/high-dynamic-range-imaging-hw-1-blog\/","title":{"rendered":"High Dynamic Range Imaging HW-1 Blog"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I chose the option 2 of the homework. I used the available implementations of Debevec&#8217;s and Mitsunaga&#8217;s algorithms. I used the following public Github page that is availableonline <a href=\"https:\/\/github.com\/banterle\/HDR_Toolbox\" data-type=\"link\" data-id=\"https:\/\/github.com\/banterle\/HDR_Toolbox\">Github Page<\/a>. I ran ten experiments (E1 to E10): validation on virtual cameras with a known CRF, six parameter experiment, noise robustness, the four real cameras given with the assignment, and finally my own phone, CRF of a Samsung Galaxy S24 FE. The code, a README, my phone sequence and all results are in hw1.zip.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>SETUP:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I downloaded the <strong>MATLAB R2026b<\/strong> by using METU&#8217;s MathWorks portal. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I downloaded the Image Processing Toolbox and Optimization Toolbox to facilitate my experiments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I downloaded the code from <a href=\"https:\/\/github.com\/banterle\/HDR_Toolbox\" data-type=\"link\" data-id=\"https:\/\/github.com\/banterle\/HDR_Toolbox\">Github Page<\/a> on 7 November 2026 The latest commit at that time was 04174f8c8b43230ec95ef56fe7b4cc9d9b1ec96e (dated 4 November 2026). This code contains the Robertson&#8217;s algorithms as well but it is not used for this homework. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In MATLAB, I went to the folder of the HDR Toolbox and ran installHDRToolbox. At the end, installHDRToolbox may give a mex error for EXR. It does not matter for the CRF functions, which do not need a C++ compiler, so this error does not concern us.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I ran help ReadLDRStack, help ReadLDRStackInfo, help DebevecCRF and help MitsunagaNayarCRF to get the parameters of each function.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Default parameters and my baselines<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The toolbox demo calls DebevecCRF with only two arguments, so all the other parameters keep their default values. I read the defaults at the top of each function and did the same for MitsunagaNayarCRF. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Every experiment changes one parameter of a fixed baseline. For Debevec, the baseline is the function&#8217;s own defaults. For Mitsunaga, it is the setting used in the toolbox demo, because the function&#8217;s own defaults are weak (We saw at the E4 and E6). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These are the default parameters:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"463\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-12-1024x463.png\" alt=\"\" class=\"wp-image-50\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-12-1024x463.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-12-300x136.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-12-767x347.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-12-1536x695.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-12.png 1560w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">CODE:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Folder structure and how to run it informations is available at README File.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment Information:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I used the following images Canon EOS 550D (9 frames), Minolta DiMAGE A1 (13), Nikon Coolpix E5400 (16), Nikon D2H (9), the virtual camera (srgb 9, linear 7, noise25\/50\/100\/150 9 each) and my Samsung S24 FE (9).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Virtual Camera JPEGs have no EXIF.  So I added a times.txt (1, 2, 4, \u2026) to each virtual camera folder. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Error Calculation:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I used 3 metrics. RMSE (root mean squared error), reciprocity and time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For RMSE, at each of the 256 pixel values, the difference between the two curves (recovered and true) is taken. The square root of the mean of the squares of these 256 differences is the RMSE of that channel. For real cameras RMSE is not calculated because we do not know the true curves. RMSE is used for virtual cameras because their curve is known for sure. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For reciprocity error, for each channel, the error in stops is computed over about 20,000 pixels \u00d7 8 neighbouring frame pairs (for a 9-frame sequence). Only well-exposed pixels are counted (pixel value between 0.05 and 0.95 in both frames).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For time, toolbox call is measured with using MATLAB&#8217;s tic\/toc. Every call is repeated 5 times and average of them is taken. The seed is fixed (rng(42)) before every repeat, so RandomSpatial sees the same pixels every time<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Design Choices: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the plots, every curve is scaled so that it equals 1 at pixel 128, because Debevec&#8217;s paper also takes the middle pixel value as its fixed point, and this is where the data is reliable. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The plots show the inverse CRF (pixel value \u2192 relative irradiance), the form both toolbox functions return. One panel per colour channel, because the channels are recovered separately and can differ. In my phone experiment blue channel differs. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In plots, the ground truth (for virtual cameras) is a thick black dashed line. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiments: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment &#8211; 1 Validation on the virtual cameras: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment 1 measures, on the virtual cameras whose inverse CRF we know (sRGB and linear), how close the inverse CRF found by each method is to the truth (RMSE and reciprocity error) and how long it takes to find it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>The linear and srgb image sequences of the virtual camera were used. For each sequence, the inverse CRFs found by Debevec and Mitsunaga were plotted together with the true curve, separately for the red, green and blue channels. The accuracy of each method was measured with RMSE and reciprocity error; each measure was first computed for each channel separately, and then the average of the three channels was reported. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Results:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I added the screenshot of the results here, results can be found in results\\tables and results\\plots<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"983\" height=\"217\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-1.png\" alt=\"\" class=\"wp-image-10\" style=\"aspect-ratio:4.526315789473684;width:602px;height:auto\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-1.png 983w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-1-300x66.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-1-766x169.png 766w\" sizes=\"auto, (max-width: 983px) 100vw, 983px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_linear-1024x342.png\" alt=\"\" class=\"wp-image-11\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_linear-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_linear-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_linear-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_linear-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_linear-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_srgb-1024x342.png\" alt=\"\" class=\"wp-image-12\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_srgb-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_srgb-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_srgb-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_srgb-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E1_virtual_srgb-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The RMSEs are between 0.0013 and 0.0072. Both methods find the true curve almost exactly. Mitsunaga is about 5 times closer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Debevec is 10 times faster.<\/strong> 0.39 s versus 4.2 s on sRGB, 0.30 s versus 2.3 s on linear. The reason is that Mitsunaga tries 6 polynomial degrees and runs 100 iterations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Runtime depends more on the implementation and the parameters than on the algorithm itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In reciprocity, Debevec is better  on sRGB (0.086 vs 0.121). On linear the two are practically equal (0.090 vs 0.091).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RMSE looks at the whole range, including the ends, while reciprocity only looks at the well-exposed middle. Debevec&#8217;s 0.086 is already at the floor of the measure (the true curve itself scores 0.087), so in the middle it cannot do better. If a single measure has to be chosen for this experiment, it is RMSE, because here the truth is known.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment &#8211; 2 Smoothing Term:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Debevec, I changed the smoothing term \u03bb. I gave smoothing_term  values 1, 10, 50, 128, 500, 2000 and 5000.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I used the virtual_srgb and Canon_EOS images. RMSE (virtual srgb) and reciprocity error (virtual srgb and Canon) were used as measures. There is no RMSE for Canon, because RMSE needs the true curve and Canon&#8217;s real CRF is not known. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"973\" height=\"433\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-2.png\" alt=\"\" class=\"wp-image-13\" style=\"aspect-ratio:2.246268656716418;width:602px;height:auto\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-2.png 973w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-2-300x134.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-2-766x341.png 766w\" sizes=\"auto, (max-width: 973px) 100vw, 973px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_Canon_EOS_550D-1024x342.png\" alt=\"\" class=\"wp-image-14\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_Canon_EOS_550D-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_Canon_EOS_550D-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_Canon_EOS_550D-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_Canon_EOS_550D-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_Canon_EOS_550D-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_virtual_srgb-1024x342.png\" alt=\"\" class=\"wp-image-15\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_virtual_srgb-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_virtual_srgb-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_virtual_srgb-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_virtual_srgb-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E2_Debevec_smoothing_term_virtual_srgb-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">On virtual_srgb, increasing \u03bb gave a better RMSE while reciprocity hardly changes. \u03bb = 128 may be a good choice because at 500 the reciprocity error is higher.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>On Canon, reciprocity stayed the same up to \u03bb = 500 (0.226 to 0.230).<br>\u03bb acts on the ends of the curve, and reciprocity does not look at the ends, so here the reciprocity error does not tell us much.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>At the ends of the curve there is very little data, so only \u03bb holds the curve there. As \u03bb grows, the ends come closer to the true curve, and since RMSE counts the ends, it drops. With a large enough \u03bb, the curve is over-smoothed and RMSE gets worse too. That is why I also added 2000 and 5000.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>\u03bb = 50, 128 and 500 are the best range. The yellow, purple and green curves lie on the black dashed line from start to end, including the end. They also had the lowest values in the RMSE table (0.016, 0.007, 0.006).<br>\u03bb = 1 and 10 are too small. They deviate as the pixel value approaches 1.<br>\u03bb = 2000 and 5000 are too large. The light blue and pink lines do not match the ground truth line.<br>RMSE first decreases, then starts to rise again at large values such as 2000; 128 or 500 give better results. Similarly, on Canon, reciprocity also starts to rise after 500. \u03bb = 128 (the toolbox default) really does seem to give the best and most balanced solution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>Runtime does not depend on \u03bb. The difference between the two comes from Grossberg&#8217;s histogram computation on the large Canon images. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment 3: Number of samples (nSamples)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I used nSamples = 50, 100, 256, 500, 1000 for both methods, on srgb and Canon. It sets how many representatives the algorithms use. What a sample corresponds is decided by sampling_strategy (Experiment 4).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Results: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"985\" height=\"512\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-3.png\" alt=\"\" class=\"wp-image-16\" style=\"aspect-ratio:1.928082191780822;width:563px;height:auto\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-3.png 985w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-3-300x156.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-3-768x399.png 768w\" sizes=\"auto, (max-width: 985px) 100vw, 985px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_virtual_srgb-1024x342.png\" alt=\"\" class=\"wp-image-20\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_virtual_srgb-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_virtual_srgb-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_virtual_srgb-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_virtual_srgb-2048x683.png 2048w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_virtual_srgb-1536x512.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_Canon_EOS_550D-1024x342.png\" alt=\"\" class=\"wp-image-17\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_Canon_EOS_550D-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_Canon_EOS_550D-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_Canon_EOS_550D-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_Canon_EOS_550D-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_Canon_EOS_550D-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_virtual_srgb-1024x342.png\" alt=\"\" class=\"wp-image-18\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_virtual_srgb-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_virtual_srgb-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_virtual_srgb-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_virtual_srgb-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Debevec_nSamples_virtual_srgb-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_Canon_EOS_550D-1024x342.png\" alt=\"\" class=\"wp-image-19\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_Canon_EOS_550D-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_Canon_EOS_550D-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_Canon_EOS_550D-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_Canon_EOS_550D-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E3_Mitsunaga_nSamples_Canon_EOS_550D-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For Debevec, RMSE is lowest at 50 and grows with more samples. The data equations grow while the smoothness equations stay fixed, so \u03bb loses weight and the ends of the curve become free. Reciprocity barely moves; runtime is flat up to 256 and grows after that.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>For Mitsunaga, RMSE stays constant (0.0013 to 0.0015) only the runtime grows. 256 samples are enough for both methods.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>At Canon, Mitsunaga&#8217;s reciprocity error is about 4 times Debevec&#8217;s (0.75 to 0.86 vs 0.226), while on srgb they are close. A polynomial of degree at most 6 cannot follow Canon&#8217;s sharp bright-tone end.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment 4: Sampling strategy<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I compared the 3 different sampling strategies. Grossberg (histogram-based, by brightness), RandomSpatial (random pixels) and RegularSpatial (grid points) are compared for both methods on srgb and Canon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1016\" height=\"356\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-4.png\" alt=\"\" class=\"wp-image-21\" style=\"aspect-ratio:2.853080568720379;width:602px;height:auto\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-4.png 1016w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-4-300x105.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-4-768x269.png 768w\" sizes=\"auto, (max-width: 1016px) 100vw, 1016px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2110\" height=\"704\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_virtual_srgb.png\" alt=\"\" class=\"wp-image-22\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_virtual_srgb.png 2110w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_virtual_srgb-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_virtual_srgb-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_virtual_srgb-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_virtual_srgb-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_virtual_srgb-2048x683.png 2048w\" sizes=\"auto, (max-width: 2110px) 100vw, 2110px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2110\" height=\"704\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_Canon_EOS_550D.png\" alt=\"\" class=\"wp-image-25\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_Canon_EOS_550D.png 2110w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_Canon_EOS_550D-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_Canon_EOS_550D-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_Canon_EOS_550D-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_Canon_EOS_550D-2048x683.png 2048w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_Canon_EOS_550D-1536x512.png 1536w\" sizes=\"auto, (max-width: 2110px) 100vw, 2110px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2110\" height=\"704\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_virtual_srgb.png\" alt=\"\" class=\"wp-image-23\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_virtual_srgb.png 2110w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_virtual_srgb-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_virtual_srgb-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_virtual_srgb-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_virtual_srgb-2048x683.png 2048w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Debevec_sampling_strategy_virtual_srgb-1024x342.png 1024w\" sizes=\"auto, (max-width: 2110px) 100vw, 2110px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2110\" height=\"704\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_Canon_EOS_550D.png\" alt=\"\" class=\"wp-image-24\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_Canon_EOS_550D.png 2110w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_Canon_EOS_550D-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_Canon_EOS_550D-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_Canon_EOS_550D-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_Canon_EOS_550D-2048x683.png 2048w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E4_Mitsunaga_sampling_strategy_Canon_EOS_550D-1536x512.png 1536w\" sizes=\"auto, (max-width: 2110px) 100vw, 2110px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For Debevec  sampling does not change the RMSE and reciprocity results much but RandomSpatial is 30 times faster on Canon, because Grossberg scans every pixel of the 18 MP images. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mitsunaga performs best at Grossberg. With spatial sampling its srgb RMSE is about 9 times worse. Reason for that is rare dark and bright levels get no samples and the polynomial goes wrong there. <strong>The toolbox&#8217;s own Mitsunaga default (RegularSpatial) is therefore a poor choice.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment 5: Polynomial degree N<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For Mitsunaga&#8217;s algorithm I tried different Polynomial degrees N. I used N = \u22121 , 2, 3, 4, 5, 6, 8 and 10, on srgb and Canon. At N= -1 algorithm tries 1 to 6 and selects the best result. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"986\" height=\"398\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-5.png\" alt=\"\" class=\"wp-image-26\" style=\"aspect-ratio:2.477366255144033;width:602px;height:auto\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-5.png 986w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-5-300x121.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-5-768x310.png 768w\" sizes=\"auto, (max-width: 986px) 100vw, 986px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_virtual_srgb-1024x342.png\" alt=\"\" class=\"wp-image-28\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_virtual_srgb-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_virtual_srgb-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_virtual_srgb-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_virtual_srgb-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_virtual_srgb-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_Canon_EOS_550D-1024x342.png\" alt=\"\" class=\"wp-image-27\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_Canon_EOS_550D-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_Canon_EOS_550D-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_Canon_EOS_550D-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_Canon_EOS_550D-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E5_Mitsunaga_N_Canon_EOS_550D-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It can be seen that N = 3 and the automatic mode are the best. Their RMSE and reciprocity values are lowest.  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Selecting lower or higher degrees gives poor results. It can be seen that at N = 8 and 10 values oscillate into negative values (obviously wrong for irradiance). The automatic mode is 25 times slower for almost no additional gain respect to N=3. N=3 is a good parameter choice.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment-6 Max Iterations:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I tried different values for maxIterations parameter for Mitsunaga&#8217;s algorithm. I used maxIterations = \u22121 (toolbox default, a single pass), 1, 10 and 100 values. At each iteration Mitsunaga re-estimates the exposure ratios.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"984\" height=\"226\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-6.png\" alt=\"\" class=\"wp-image-29\" style=\"aspect-ratio:4.330935251798561;width:602px;height:auto\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-6.png 984w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-6-300x69.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-6-766x176.png 766w\" sizes=\"auto, (max-width: 984px) 100vw, 984px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_virtual_srgb-1024x342.png\" alt=\"\" class=\"wp-image-34\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_virtual_srgb-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_virtual_srgb-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_virtual_srgb-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_virtual_srgb-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_virtual_srgb-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_Canon_EOS_550D-1024x342.png\" alt=\"\" class=\"wp-image-37\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_Canon_EOS_550D-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_Canon_EOS_550D-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_Canon_EOS_550D-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_Canon_EOS_550D-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E6_Mitsunaga_maxIterations_Canon_EOS_550D-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The result shows that at best results is obtained at maxIterations=10. This result verifies the paper&#8217;s claim that result converges in less than 10 iterations. 100 iterations does not make the result better and adds additional time. The gain is largest on Canon because its EXIF times are not perfect. The toolbox default runs no iterations at all. This parameter can be improved for toolbox. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment -7  Number of Images: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I changed the number of images used in the stack exposure for Debevec&#8217;s and Mitsunaga&#8217;s algorithm. I used n = 3, 5, 9 for both methods.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1016\" height=\"303\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-7.png\" alt=\"\" class=\"wp-image-30\" style=\"aspect-ratio:3.3444444444444446;width:602px;height:auto\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-7.png 1016w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-7-300x89.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-7-768x229.png 768w\" sizes=\"auto, (max-width: 1016px) 100vw, 1016px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_Canon_EOS_550D-1024x342.png\" alt=\"\" class=\"wp-image-39\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_Canon_EOS_550D-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_Canon_EOS_550D-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_Canon_EOS_550D-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_Canon_EOS_550D-2048x683.png 2048w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_Canon_EOS_550D-1536x512.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_virtual_srgb-1024x342.png\" alt=\"\" class=\"wp-image-40\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_virtual_srgb-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_virtual_srgb-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_virtual_srgb-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_virtual_srgb-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Debevec_virtual_srgb-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_Canon_EOS_550D-1024x342.png\" alt=\"\" class=\"wp-image-41\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_Canon_EOS_550D-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_Canon_EOS_550D-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_Canon_EOS_550D-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_Canon_EOS_550D-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_Canon_EOS_550D-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_virtual_srgb-1024x342.png\" alt=\"\" class=\"wp-image-38\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_virtual_srgb-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_virtual_srgb-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_virtual_srgb-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_virtual_srgb-2048x683.png 2048w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E7_Mitsunaga_virtual_srgb-1536x512.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Results demonstrates that 3 images are too few. We can see that using 5 images gave the lowest srgb RMSE for both methods. With 9, Debevec gets slightly worse (the same \u03bb effect as in E3), and Mitsunaga barely changes. Runtime grows with the number of images.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment-8 Noise Robustness:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I tested the noise robustness for both Debevec and Mitsunaga. I used the noise25, 50, 100 and 150 sequences of the virtual camera. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"270\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-8-1024x270.png\" alt=\"\" class=\"wp-image-31\" style=\"aspect-ratio:3.7861635220125787;width:602px;height:auto\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-8-1024x270.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-8-300x79.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-8-767x202.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-8.png 1029w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Debevec_noise-1024x342.png\" alt=\"\" class=\"wp-image-42\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Debevec_noise-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Debevec_noise-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Debevec_noise-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Debevec_noise-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Debevec_noise-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Mitsunaga_noise-1024x342.png\" alt=\"\" class=\"wp-image-43\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Mitsunaga_noise-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Mitsunaga_noise-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Mitsunaga_noise-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Mitsunaga_noise-2048x683.png 2048w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E8_Mitsunaga_noise-1536x512.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Results show that Debevec is very sensitive to noise. Debevec&#8217;s RMSE is 6.5 times larger at noise25 and 12.5 times at noise100.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> Mitsunaga is more robust to noise. Even at noise100 it beats Debevec at noise25. Reason for this situation is that Debevec fits every pixel value separately and follows the noise, while Mitsunaga&#8217;s few-coefficient polynomial smooths it out. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Noise does not affect the runtime.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experiment 9:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this experiment, I tested both the Debevec and Mitsunaga methods on four cameras: Canon, Minolta, Nikon Coolpix, and Nikon D2H. For both methods, the baseline parameter values are used. The resulting RGB response curves, reciprocity error, and runtime will be measured.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"997\" height=\"232\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-9.png\" alt=\"\" class=\"wp-image-32\" style=\"aspect-ratio:4.3;width:602px;height:auto\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-9.png 997w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-9-300x70.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-9-765x178.png 765w\" sizes=\"auto, (max-width: 997px) 100vw, 997px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Canon_EOS_550D-1024x342.png\" alt=\"\" class=\"wp-image-47\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Canon_EOS_550D-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Canon_EOS_550D-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Canon_EOS_550D-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Canon_EOS_550D-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Canon_EOS_550D-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Minolta_DiMAGE_A1-1024x342.png\" alt=\"\" class=\"wp-image-45\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Minolta_DiMAGE_A1-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Minolta_DiMAGE_A1-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Minolta_DiMAGE_A1-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Minolta_DiMAGE_A1-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Minolta_DiMAGE_A1-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_Coolpix_E5400-1024x342.png\" alt=\"\" class=\"wp-image-46\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_Coolpix_E5400-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_Coolpix_E5400-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_Coolpix_E5400-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_Coolpix_E5400-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_Coolpix_E5400-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_D2H-1024x342.png\" alt=\"\" class=\"wp-image-44\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_D2H-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_D2H-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_D2H-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_D2H-1536x512.png 1536w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E9_Nikon_D2H-2048x683.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">From results we can see that Debevec has the lower reciprocity error and is faster on every camera. The gap is largest on Canon, because it has a S-shaped curve and Mitsunaga&#8217;s polynomial algorithm cannot follow that. Difference is smallest on the Nikon D2H because its curve is simple and polynomial algorithm can detect it easily.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It should be noted that ranking the cameras against each other may not be suitable because the scenes, noise and frame counts differ. Comparing the Debevec&#8217;s and Mitsunaga&#8217;s algorithm at the same scene makes more sense. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Experiment-10 The CRF of my phone (Samsung Galaxy S24 FE): <\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, in this experiment I find the CRF of my mobile phone.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How I took the photos:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The 9 frames of my phone sequence, from 1\/90 s (0.jpg) to 4 s (8.jpg):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"157\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-13-1024x157.png\" alt=\"\" class=\"wp-image-51\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-13-1024x157.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-13-300x46.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-13-765x117.png 765w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-13.png 1209w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">My mobile phone is a Samsung Galaxy S24 FE. I did not use any external apps  or libraries because the Samsung camera allows users to change settings such as ISO and exposure time. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, I turned off the settings that modify and process the images: the scene optimizer, the flash and extra processing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then I used the camera&#8217;s Pro mode to change the parameters. I fixed ISO at 50 and white balance at 4000 K, and locked the focus manually. I saved JPEGs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I took the photos in a small private study room in the METU library. There was no movement in the scene, and the only light was the ceiling LED panel. For the scene, I set up a wooden desk with a wide range of brightness. Brightest part was a white tissue held down by a blue glasses case. Darkest part was a closed black laptop and shadow under the shelf.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I shot with the rear main camera in Pro mode. I had forgotten my tripod, so I placed the phone in front of my bag on the desk and didn\u2019t move it between shots, and I used a 2-second self-timer to avoid shake. The only setting I changed was the exposure time (shutter speed), which I roughly doubled at each step from 1\/90 s to about 4 s. I kept 1\/90 s as the shortest exposure so that the LED flicker would not be seen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I took 10 frames and dropped the last one because it was almost fully saturated, so I used 9. The exposure times of the 9 frames were 1\/90, 1\/45, 1\/20, 1\/10, 1\/4, 1\/2, 1, 2, and 4 s. I tried to double the exposure time at each step, but my phone&#8217;s settings are not that flexible, so I had to choose from the available values. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, I copied the original JPEGs directly to my PC to keep their EXIF data. They are in data\/phone\/scene1\/, from 0.jpg (darkest) to 8.jpg (brightest).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"57\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-10-1024x57.png\" alt=\"\" class=\"wp-image-33\" style=\"aspect-ratio:18.242424242424242;width:602px;height:auto\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-10-1024x57.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-10-300x17.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-10-766x43.png 766w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/image-10.png 1033w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E10_S24FE_scene1-1024x342.png\" alt=\"\" class=\"wp-image-48\" srcset=\"https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E10_S24FE_scene1-1024x342.png 1024w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E10_S24FE_scene1-300x100.png 300w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E10_S24FE_scene1-767x256.png 767w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E10_S24FE_scene1-2048x683.png 2048w, https:\/\/blog.metu.edu.tr\/e283486\/files\/2026\/11\/E10_S24FE_scene1-1536x512.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Debevec&#8217;s reciprocity error in this experiment is the lowest value so far. The reciprocity errors of the four cameras were all higher than 0.117.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Debevec again gave a better result than Mitsunaga (about 3 times lower error). In the mid-tones, the two methods are almost identical. In all three channels, the values between 0.15 and 0.85 are similar, and the ends are separate. Debevec steepens suddenly after 0.9. Mitsunaga cannot capture those values with its polynomial algorithm, so its error is higher.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Among the colour channels, blue differs. There is no sharp increase after pixel value 0.9. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similar to other cameras, the runtime is again shorter for Debevec.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Problems and Solutions:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When I executed experiment 10, MATLAB gave a warning &#8220;Unable to read XMP metadata&#8221; because Samsung&#8217;s JPEGs&#8217; XMP metadata does not follow the standard. It is just a warning, exposure information comes from the EXIF block without any problem. Warning can be ignored. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another problem I experienced that I had to take pictures without a tripod. As a solution, I placed the phone in front of my bag and when I change the settings I tried my best to not to move my phone.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Machine Used:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I used my personal laptop as machine. All times were measured on an Abra A7 V12.1 laptop with an Intel Core i5-10300H CPU @ 2.50 GHz, 16 GB RAM, 64-bit Windows and MATLAB R2026b Update 1.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">REFERENCES<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[1] Paul E. Debevec and Jitendra Malik. Recovering high dynamic range radiance maps from photographs. In Proceedings of the 24th Annual Conference on Computer Graphics and Interactive Techniques (SIGGRAPH \u201997), pages 369\u2013378, 1997.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[2] T. Mitsunaga, S.K. Nayar, Radiometric self calibration, in: Proceedings of CVPR, vol. 2, June 1999, pp. 374\u2013380.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[3] F. Banterle, <em>HDR Toolbox: HDR Toolbox for processing High Dynamic Range (HDR) images into MATLAB and Octave<\/em>, GitHub repository, commit 04174f8, GPL v3. <a href=\"https:\/\/github.com\/banterle\/HDR_Toolbox\">https:\/\/github.com\/banterle\/HDR_Toolbox<\/a> (accessed 7 November 2026).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I chose the option 2 of the homework. I used the available implementations of Debevec&#8217;s and Mitsunaga&#8217;s algorithms. I used the following public Github page that is availableonline Github Page. I ran ten experiments (E1 to E10): validation on virtual cameras with a known CRF, six parameter experiment, noise robustness, the four real cameras given [&hellip;]<\/p>\n","protected":false},"author":9674,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[1],"tags":[],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.metu.edu.tr\/e283486\/wp-json\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.metu.edu.tr\/e283486\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.metu.edu.tr\/e283486\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.metu.edu.tr\/e283486\/wp-json\/wp\/v2\/users\/9674"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.metu.edu.tr\/e283486\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":0,"href":"https:\/\/blog.metu.edu.tr\/e283486\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.metu.edu.tr\/e283486\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.metu.edu.tr\/e283486\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.metu.edu.tr\/e283486\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}