logo-photo

carol.gimp.org

gimp and photography

Recompose the Sky

I ran into an interesting problem while working with TheGIMP and the Levels tool to bring out the features of the subject of the photograph, the rest of the photograph becomes affected also causing a washed out look to the background. A very nice solution for restoring the sky colors in outdoor photographs was outlined by Jenny Drake on the gimp-user mail list in September, 2004. That technique is demonstrated here.

Getting Started

This photograph is of a beautiful bronze statue who lives in Antioch, California and was sculpted by Elizabeth MacQueen. If you would like to use this photograph with the tutorial, you will need both images or you can use the xcf for the project since it will be easier to follow by using layers.

the original
cannerylady-original
levels adjusted
cannerylady-levels

I used the Levels tool to bring out the detail in the statue and the clone tool to clean up some of the problems that a statue can get if it lives outside. The result of this is a washed out sky and the subject of this tutorial.

One thing to note about spot fixing on images (some bird residue needed to be removed from this photograph) it is better to make these kinds of fixes after the color correction.

filter-colors-decompose

The Decompose Plug-in

Use the Decompose Filter on the original darker image or layer, found by following the menu Filters -->Colors -->Decompose.... This filter breaks down the colors and makes a grayscale image that represents the different color components found in the image it is working with. The default setting of the filter is RGB (red, green and blue), this technique uses the S part of HSV (hue, saturation and value). So you can toggle the "Decompose to layers" option off and discard the hue and value layers.

Hue
decompose-hue
Saturation
decompose-saturation
Value
decompose-value

Look for the word "Saturation" either in the title of the images (if you toggled the layers part off) or in the layers dialog where TheGIMP named the layers according to which color they represent.

Work with the Saturation Layer

Next we are going to invert the colors of the saturation layer that was made in the last step and apply this as a layer mask to the image we are working on.

Invert colors of saturation layer

The plug-in that inverts the colors, that is exchanges each color in an image for its opposite, is found in the menu via Layer -->Colors -->Invert. Since we are working on a grayscaled image, the darker pixels will be replaced with lighter pixels.

Add a layer mask to the image

I made a duplicate layer of my levels adjusted image and worked on this, simply so that if I make a mistake I don't need to start completely over again. Turn off the view of the original and the levels adjusted and clone tool fixed layer leaving only the duplicate layer showing by toggling the eye icon next to the thumbnail in the layers dialog. To add the mask, right click to the right of the thumbnail in the layers dialog and select "Add Layer Mask" from this menu. A dialog will pop-up giving you some choices in the type of mask to use, just agree to whatever the dialog suggests, we will be pasting our inverted saturation layer to the mask.

decompose-saturation-inverted
dialog-layers-second

Right click on the inverted Saturation Layer Edit -->Copy then Edit -->Paste onto your original image and its layer mask. Touch the Anchor button on the dialog to place the pasted layer.

Adjust the layer mask

Now you can see the blue parts of the sky are becoming transparent in the image. A little work on the mask will make the blue parts disappear even more. Don't worry about the subject of the photograph yet, she will be restored in the last step.

Use the levels tool on the mask. Move the center triangle in the Input Levels portion of the dialog until the blue parts of the sky disappear.

One step away from recomposing the sky; a couple of steps away from putting our fixed statue back....

screenshot-image-masked
cannerylady-picksky

Pick a sky color

Use TheGIMPs color picker to pick a nice color of sky to use from the original image. You also have the option to make a gradient and use this, instructions for this are outlined in the replace the sky tutorial. A solid replacement worked well enough for this example.

I picked the color from two different places on the layer containing the original image and chose the nicest color from those.

1

2

cannerylady-picksky1 cannerylady-picksky2

I chose the first color, I was there and the sky was a bright blue....

Work With the Value Layer

Using the same technique outline in my another background removal tutorial it is easy to transform the Value layer into a mask that will show the statue & treeline and block the sky.

preparation

Some quick work with a few of TheGIMP's tools and plug-ins before pasting the image to a mask.

decompose-value-histogram1

Use the histogram tool with the default setting to reduce the colors to only black and white.

decompose-value-histogram2

Use the Gaussian Blur plug-in Filters -->Blur -->Gaussian Blur, with the default settings to soften the edges of the image.

decompose-value-histogram3

Paint with black on the parts that should be masked that the histogram missed.

decompose-value-histogram4

Layers-->Color-->Invert this modified value layer.

Apply layer mask and tweak

Make another copy of the color adjusted original; using the buttons in the lower portion of the dialog is the easiest way and move this new layer to the top of the layer stack (green up arrow).

Mask this new layer the same way as we did with the sky layer and paste the modified value layer to the mask.

My new image had a halo around the statue which i removed by adjusting the Levels of the mask. It was much easier to do this to the applied mask; you can determine the best levels settings by watching the preview.

dialog-layers-final
cannerylady

The Final Image

There she is and her xcf is here as well. I admit I did a little more masking and cloning to get the light fixtures out of the background.

All of this could have been avoided if my camera would allow me to trigger the flash in spite of what it thought about the brightness of the day....

another-gnu-type-sm

Most all of my software is gnu. thanks!

Valid XHTML 1.1!

Creative Commons License

This work is

licensed under a

Creative Commons License.