Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
function out = LDR_reconstruction(im,sigmaRN,T,B,denoise)
% Authors : Abhiram Gnanasambandam (agnanasa@purdue.edu),
%Stanley H. Chan (stanchan@purdue.edu)
%Intelligent Imaging Lab, Dept. of ECE, Purdue University
% Reference:
%[1]HDR Imaging with Quanta Image Sensors: Theoretical Limits and Optimal
%Reconstruction, Abhiram Gnanasambandam and Stanley H. Chan,
%IEEE Transactions on Computational Imaging, 2020
%[2]High Dynamic Range Imaging using Quanta Image Sensors, Abhiram
%Gnansambandam, Jiaju Ma, Stanley H. Chan, IISW 2019.
% This function reconstructs LDR QIS images
%im - Noisy sum of static QIS data
%sigmaRN - Read noise of the sensor
% T - Number of frames summer to get T
% B - Non-linear mapping corresponding to q-bit QIS.
% denoise - use BM3D denoiser if denoise = 1.
addpath('utils/denoisers')
if denoise == 1
im = 2 * sqrt(im + 3/8 + T * sigmaRN^2);
maxi = max(im(:));
mini = min(im(:));
im = (im - mini)/(maxi-mini);
im = wrapper_BM3D(im,1/(maxi-mini))*(maxi-mini) + mini ;
im = (im/2).^2 - 1/8 - T * sigmaRN^2;
im(im<0) = 0;
im(im>max(im(:))) = max(im(:));
end
im = im/T;
out = B(im);
end