Last active
August 29, 2015 14:10
-
-
Save danielronnkvist/4db1c523ef0df1378c23 to your computer and use it in GitHub Desktop.
makeHDR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tic | |
clear all | |
load('gfun.mat'); | |
ffun= (2.^gfun); | |
finalpic(:,:,:) = zeros(683,1024,3); | |
for i=1:14 | |
value = imread(strcat('Img', int2str(i), '.tiff')); | |
if value > 127 | |
value = 255-value; | |
end | |
irValue = ffun(value+1)/(2*i); | |
finalpic = imadd(finalpic,irValue.*(double(value)/255)); | |
end | |
%tonemap and show the result | |
figure | |
imshow(tonemap(finalpic)); | |
toc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment