Now that we know the theory, let's dive into a real life example. For the purposes of this exercise, we shot three pictures of a scene with a wide range of brightness, in an office, using three different EV settings: -2, 0, and 2. The names of the three images are image_-2.jpg
, image_0.jpg
, and image_2.jpg
. So, in order to use them to make an HDR image, we will follow the steps as shown:
Save the names of the three images in a cell and the respective EV choices in a matrix:
>> filenames = {'image_-2.jpg', 'image_0.jpg', 'image_2.jpg'}; >> expValues = [-2, 0, 2];
In order to get an idea of what these images look like, we can optionally load them and display them:
>> im1 = imread('image_-2.jpg'); >> im2 = imread('image_0.jpg'); >> im3 = imread('image_2.jpg'); >> subplot(1,3,1),imshow(im1),title('EV: -2') >> subplot(1,3,2),imshow(im2),title('EV: 0') >> subplot(1,3,3),imshow(im3),title('EV: 2')
Now, we...