Linux Format - UK (2019-12)

(Antfer) #1
70 LXF257 December 2019 http://www.linuxformat.com

TUTORIALS HDR photography


from the sky later to show through. However, this is
destructive, in the sense that once you’ve exited GIMP
and, therefore, flushed its undo buffer, you can’t
undelete anything.
Instead, we’re going to apply a transparency mask to
the foreground layer. So right-click the foreground layer
and select Add Layer Mask, accepting the default of
initialising to white (full opacity), before clicking on Add.
You’ll notice that a white rectangle, representing the
mask, appears next to the foreground layer. Before
going any further, and assuming that your two images
are correctly registered, lock them both to ensure you
don’t accidentally shift one layer with respect to the
other. To do this, click the right-most box to the left of
the thumbnail image of both layers and a chain icon will
appear to show the lock.
Now all that remains to be done is to make the mask
on the foreground image transparent in the areas
where you want the sky to show through. Do this by
selecting the mask, as indicated by it having a white
border, and painting it black where you want it to be
transparent. Select black as the foreground colour in
the Toolbox dock and select the paintbrush tool. Now
just paint the mask black, as necessary, starting with a
large brush, and reducing the size (the [ and ] keys
reduce and increase the brush size, respectively). Zoom
in as necessary to define the edge more accurately.
If you accidentally make too much of the mask
transparent, just make it opaque again by painting in
white. When you’ve finished, save the image to preserve
the layers and masks, and also use the Export option to
generate a JPEG file in which all the layers and masks
are correctly combined.

The automatic method
You could use GIMP to create an HDR image with more
than two photos, but generally speaking if you want to
go beyond the sort of effect we’ve just seen by
combining a much larger number of photos, a
dedicated HDR package is the way to go. Here we’re
going to see how to use one called Luminance HDR
which, in our experience, gives good results.
The first example we’ve chosen, while not an
especially common scene, was picked because it has
an unusually high-dynamic range. The scene in question
(see top-left) was taken just inside a cave entrance,
looking out. A common way of photographing this view
is with the outside landscape exposed normally so that
the cave is rendered almost totally black, framing the
image. While this would be a perfectly acceptable
composition, we wanted to do something a bit different,
so we shot no fewer than six photos, with different
exposures separated by 1EV.
At one end of the range the outdoor scenery was
rendered well, but the cave interior was totally black,
while at the other end, the scene outside the cave was
totally white, but we could see some detail in the cave.
Even in this latter case, the cave interior was still
modestly illuminated and, while we could have gone
further, we took the view that caves are supposed to
look somewhat gloomy.
Our first step in turning these into an HDR image is
to start Luminance HDR. Bizarrely, when you do this
you’ll discover that it has no maximise icon – yet you
can’t see the bottom of the window, or even move it

the same results using any photo editor that supports
layers and masks.
First, you need to select just two photos from your
set of bracketed shots, one in which the foreground is
perfectly exposed, and exactly as you’d like it to appear
in the final photo, and one in which the sky has all the
detail you want. Before opening them in GIMP, it might
make things easier if you first rename them with
‘foreground’ and ‘sky’ in their filenames. Now open both
of the photos in GIMP – they’ll appear in separate
windows. Our next job is to keep the sky image as the
background or base image, and to place the foreground
image as a layer above that base image.
So go to the foreground image, select it (Ctrl+A) and
copy in (Ctrl+C). You can now close the foreground
image, discarding any changes. You’ll now have just the
one image open – the sky – and you’ll notice in the
Layers – Brushes dock that there’s only the one layer.
Next, select Edit > Paste as > New Layer and you’ll
notice that the foreground image appears as a new
layer called Clipboard. You might want to rename it as
Foreground by right-clicking it and selecting Edit Layer
Attributes. At this point, you could just delete the top
part of the foreground layer to allow the dramatic sky

Monitors with
HDR capabilities
are gradually
becoming
available, at
a price. They
might not be
able to display
as many tonal
values as a
proper HDR
image contains,
but they’re a
step in the
right direction.

HANDLING MOVEMENT


Any movement between exposures is potentially a problem. Clouds
moving in the sky is a common example, although a city scene with
moving people and vehicles is clearly much more of a challenge.
While the two methods we’ve looked at here don’t produce exactly
the same sort of HDR effect, the presence of movement might
influence your choice of which of them to use.
Unlike some other HDR software, Luminance HDR claims to
handle movement. However, there’s a limit to how well this can work,
and the result might not be entirely satisfactory. Nevertheless, in the
case of scenes that contain large moving objects, there might well be
no alternative.
With the case of movement of clouds in the sky, the method of
combining two images in GIMP may well give better results. This is
because the horizon acts as the demarcation between the two
images so now, of course, the sky and clouds in the final image will be
taken from just one of the pair of exposures. The fact that the clouds
in the other exposure might be in an entirely different part of the sky
is, therefore, irrelevant.

In Luminance HDR’s tone-mapping stage, the HDR image is rendered in such a way that it can be
displayed on screen or printed.

70 LXF257December 2019 6668Decmbr 20198i 0


TUTORIALS HDR photography


from the sky later to show through. However, this is
destructive, in the sense that once you’ve exited GIMP
and, therefore, flushed its undo buffer, you can’t
undelete anything.
Instead, we’re going to apply a transparency mask to
the foreground layer. So right-click the foreground layer
and select Add Layer Mask, accepting the default of
initialising to white (full opacity), before clicking on Add.
You’ll notice that a white rectangle, representing the
mask, appears next to the foreground layer. Before
going any further, and assuming that your two images
are correctly registered, lock them both to ensure you
don’t accidentally shift one layer with respect to the
other. To do this, click the right-most box to the left of
the thumbnail image of both layers and a chain icon will
appear to show the lock.
Now all that remains to be done is to make the mask
on the foreground image transparent in the areas
where you want the sky to show through. Do this by
selecting the mask, as indicated by it having a white
border, and painting it black where you want it to be
transparent. Select black as the foreground colour in
the Toolbox dock and select the paintbrush tool. Now
just paint the mask black, as necessary, starting with a
large brush, and reducing the size (the [ and ] keys
reduce and increase the brush size, respectively). Zoom
in as necessary to define the edge more accurately.
If you accidentally make too much of the mask
transparent, just make it opaque again by painting in
white. When you’ve finished, save the image to preserve
the layers and masks, and also use the Export option to
generate a JPEG file in which all the layers and masks
are correctly combined.

The automatic method
You could use GIMP to create an HDR image with more
than two photos, but generally speaking if you want to
go beyond the sort of effect we’ve just seen by
combining a much larger number of photos, a
dedicated HDR package is the way to go. Here we’re
going to see how to use one called Luminance HDR
which, in our experience, gives good results.
The first example we’ve chosen, while not an
especially common scene, was picked because it has
an unusually high-dynamic range. The scene in question
(see top-left) was taken just inside a cave entrance,
looking out. A common way of photographing this view
is with the outside landscape exposed normally so that
the cave is rendered almost totally black, framing the
image. While this would be a perfectly acceptable
composition, we wanted to do something a bit different,
so we shot no fewer than six photos, with different
exposures separated by 1EV.
At one end of the range the outdoor scenery was
rendered well, but the cave interior was totally black,
while at the other end, the scene outside the cave was
totally white, but we could see some detail in the cave.
Even in this latter case, the cave interior was still
modestly illuminated and, while we could have gone
further, we took the view that caves are supposed to
look somewhat gloomy.
Our first step in turning these into an HDR image is
to start Luminance HDR. Bizarrely, when you do this
you’ll discover that it has no maximise icon – yet you
can’t see the bottom of the window, or even move it

the same results using any photo editor that supports
layers and masks.
First, you need to select just two photos from your
set of bracketed shots, one in which the foreground is
perfectly exposed, and exactly as you’d like it to appear
in the final photo, and one in which the sky has all the
detail you want. Before opening them in GIMP, it might
make things easier if you first rename them with
‘foreground’ and ‘sky’ in their filenames. Now open both
of the photos in GIMP – they’ll appear in separate
windows. Our next job is to keep the sky image as the
background or base image, and to place the foreground
image as a layer above that base image.
So go to the foreground image, select it (Ctrl+A) and
copy in (Ctrl+C). You can now close the foreground
image, discarding any changes. You’ll now have just the
one image open – the sky – and you’ll notice in the
Layers – Brushes dock that there’s only the one layer.
Next, select Edit > Paste as > New Layer and you’ll
notice that the foreground image appears as a new
layer called Clipboard. You might want to rename it as
Foreground by right-clicking it and selecting Edit Layer
Attributes. At this point, you could just delete the top
part of the foreground layer to allow the dramatic sky

Monitorswith
HDRcapabilities
aregradually
becoming
available,at
a price.They
mightnotbe
abletodisplay
asmanytonal
valuesasa
properHDR
imagecontains,
butthey’rea
stepinthe
rightdirection.

HANDLING MOVEMENT


Any movement between exposures is potentially a problem. Clouds
moving in the sky is a common example, although a city scene with
moving people and vehicles is clearly much more of a challenge.
While the two methods we’ve looked at here don’t produce exactly
the same sort of HDR effect, the presence of movement might
influence your choice of which of them to use.
Unlike some other HDR software, Luminance HDR claims to
handle movement. However, there’s a limit to how well this can work,
and the result might not be entirely satisfactory. Nevertheless, in the
case of scenes that contain large moving objects, there might well be
no alternative.
With the case of movement of clouds in the sky, the method of
combining two images in GIMP may well give better results. This is
because the horizon acts as the demarcation between the two
images so now, of course, the sky and clouds in the final image will be
taken from just one of the pair of exposures. The fact that the clouds
in the other exposure might be in an entirely different part of the sky
is, therefore, irrelevant.

In Luminance HDR’s tone-mapping stage, the HDR image is rendered in such a way that it can be
displayed on screen or printed.
Free download pdf