% Ex 3: Simulate a display
% This is a part of the tone-mapping workshop 
% (c) 2012 Rafal Mantiuk

img = hdrread( 'slate_mines.hdr' );
%img = hdrread( 'memorial.hdr' );

%%

L_peak = 100;
L_black = 1;
k = 0.005;
gamma = 1.9;

E_amb = 10000;

P = lin2srgb(img/100);
display_img = gog_fw_display_model( P, gamma, L_peak, L_black, E_amb, k );

imshow( lin2srgb( display_img/100 ) );
