We refer to contrast blending as a technique to blend several differently exposed (exposure bracketed) images in order to achieve a higher [[Dynamic range]].

+

{{Glossary|A technique to blend several exposure [[Bracketing|bracketed]] images in one image|1}} in order to achieve a higher [[Dynamic range]].

−

There are several more or less automatic approaches realized in commercial programs or plugins like [http://www.hdrsoft.com Photomatix] and Fred Miranda's [http://www.fredmiranda.com/DRI/ DRI] or the free [[photoshop]] actions from [[Contrast Blending Actions|Erik Krause]].

+

There are several more or less automatic approaches realized in commercial programs or plugins like [[Photomatix]], [[FDRTools]] and Fred Miranda's [http://www.fredmiranda.com/DRI/ DRI], the free [[photoshop]] actions from [[Contrast Blending Actions|Erik Krause]], or [http://turtle.as.arizona.edu/jdsmith/exposure_blend.php exposure-blend], a script suite for the [[Gimp]].

−

Another way to use bracketed exposures is to assemble them into a single [[HDR]] image. This can be done with free [http://projects.ict.usc.edu/graphics/HDRShop/ HDRShop], new [[Photoshop]] CS2, [[cinepaint]] ([http://people.freenet.de/hsbosny/HDR_Tutorial/HDR_Tutorial-en.html tutorial for using cinepaint here]) or [http://www.mpi-inf.mpg.de/resources/hdr/calibration/pfs.html PFScalibration]. The problem here is that the HDR image must be compressed to reveal the complete contrast range on a computer monitor.

+

Currently the best results (even if compared with HDR [[tone mapping]] algorithms) are provided by [[enfuse]], an application that combines contrast blending with multi resolution spline blending (as known from [[enblend]]).

−

+

−

This was a major problem for [[HDRShop]] since only [[gamma]] adjustment or (later) the Reinhard [[tone mapping]] plugin existed. It is still a problem for Photoshop CS2, but here the [[HDR]] images can at least be converted to 16 bit per channel images with more possibilities. Brian Greenstone wrote a nice tutorial about that: [http://www.panomundo.com/panos/howto/workflow_expbracketing.html]

+

−

+

−

There are several tools that can handle HDR images: [[enblend]], [[Hugin]] and [[Nona]] can work with HDR images of different flavours. [[PTViewer]] 3.1 can display HDR images with adaptive [[dynamic range]] directly. For Linux there are several open source command line tools available that implement different [[tone mapping]] algorithms: [http://www.mpi-sb.mpg.de/resources/pfstools/]

+

However, contrast blending can be done completely 'by hand' as described on Michael Reichmann's site - http://www.luminous-landscape.com/tutorials/digital-blending.shtml

However, contrast blending can be done completely 'by hand' as described on Michael Reichmann's site - http://www.luminous-landscape.com/tutorials/digital-blending.shtml

Line 15:

Line 11:

"I use the second technique, the Layer Mask approach, and have found that it works quickly and easily, while still leaving much room for tweaking as necessary. The only change I've made in my approach is at the end where I work in Levels instead of curves. I find that sliding the mid-tones to the right helps make the resulting image look more realistic. In some cases, you just have to play around with all three sliders until you get a good blend. I also will reduce the opacity of the top layer down to about 85% as well."

"I use the second technique, the Layer Mask approach, and have found that it works quickly and easily, while still leaving much room for tweaking as necessary. The only change I've made in my approach is at the end where I work in Levels instead of curves. I find that sliding the mid-tones to the right helps make the resulting image look more realistic. In some cases, you just have to play around with all three sliders until you get a good blend. I also will reduce the opacity of the top layer down to about 85% as well."

+

+

Here is a fragment of an [[ImageMagick]] script by Peter Gawthrop that can be used to automate contrast blending:

+

+

normal=$1

+

under=$2

+

over=$3

+

+

### Merge under exposure

+

## Mask for under exposed

+

convert -type Grayscale $under _mask.tif

+

## Masked version

+

composite -compose CopyOpacity _mask.tif $under _under_masked.tif

+

## Merge with background

+

composite -compose Darken _under_masked.tif $normal _composite.tif

+

+

### Merge over exposure

+

## Mask for over exposed

+

convert -negate -type Grayscale $over _mask.tif

+

## Masked version

+

composite -compose CopyOpacity _mask.tif $over _over_masked.tif

+

## Merge with background

+

composite -compose Lighten _over_masked.tif _composite.tif merged.tif

+

+

Based directly and more simply on the directions at luminous landscape, here's an imagemagick snippet that works from just two images, one underexposed ($DARK) and one overexposed ($LIGHT).

+

+

# first, we need a grayscale, blurred copy of the light image

+

LIGHTBLUR=$LIGHT.blurtemp.$$

+

convert -type GrayScale -blur 40x20 $LIGHT $LIGHTBLUR

+

# then we stack!

+

composite $DARK $LIGHT $LIGHTBLUR -compose atop $OUTPUT

+

# cleanup

+

rm $LIGHTBLUR

+

+

The other way to use [[bracketing|bracketed]] exposures is to assemble them into a single [[HDR]] image. This can be done with free [http://projects.ict.usc.edu/graphics/HDRShop/ HDRShop], new [[Photoshop]] CS2, [[cinepaint]] ([http://people.freenet.de/hsbosny/HDR_Tutorial/HDR_Tutorial-en.html tutorial for using cinepaint here]), [[PFScalibration]] or the [[FDRTools|FDRExposer]].

+

+

The problem here is that the HDR image must be compressed with [[tone mapping]] to reveal the complete contrast range on a computer monitor.

+

+

This was a major problem for [[HDRShop]] since only [[gamma]] adjustment or (later) the Reinhard [[tone mapping]] plugin existed. It is still a problem for Photoshop CS2, but here the [[HDR]] images can be converted to a 16 or 8 bit per channel image with more possibilities. Brian Greenstone wrote a nice tutorial about that: [http://www.panomundo.com/panos/howto/workflow_expbracketing.html]

+

+

Meanwhile two Photoshop CS2 plugins are available that deal with that problem: [[Photomatix]] and FDRCompressor. See [[HDR compression]] for a comparison.

+

+

For Linux there are several open source command line tools available as part of [[pfstmo]] that implement different [[tone mapping]] algorithms.

+

+

There are several panoramic tools that can handle HDR images: [[enblend]], [[hugin]] and [[nona]] can work with HDR images of different flavours. [[PTViewer]] 3.1 can display HDR images with adaptive [[dynamic range]] directly.

Mark Fink [http://www.northernlight.net www.northernlight.net]

Mark Fink [http://www.northernlight.net www.northernlight.net]

+

[[Category:Glossary]][[Category:Tutorial:Specialised]]

Latest revision as of 09:18, 21 January 2008

A technique to blend several exposure bracketed images in one image in order to achieve a higher Dynamic range.

Currently the best results (even if compared with HDR tone mapping algorithms) are provided by enfuse, an application that combines contrast blending with multi resolution spline blending (as known from enblend).

"I use the second technique, the Layer Mask approach, and have found that it works quickly and easily, while still leaving much room for tweaking as necessary. The only change I've made in my approach is at the end where I work in Levels instead of curves. I find that sliding the mid-tones to the right helps make the resulting image look more realistic. In some cases, you just have to play around with all three sliders until you get a good blend. I also will reduce the opacity of the top layer down to about 85% as well."

Here is a fragment of an ImageMagick script by Peter Gawthrop that can be used to automate contrast blending:

The problem here is that the HDR image must be compressed with tone mapping to reveal the complete contrast range on a computer monitor.

This was a major problem for HDRShop since only gamma adjustment or (later) the Reinhard tone mapping plugin existed. It is still a problem for Photoshop CS2, but here the HDR images can be converted to a 16 or 8 bit per channel image with more possibilities. Brian Greenstone wrote a nice tutorial about that: [1]

Meanwhile two Photoshop CS2 plugins are available that deal with that problem: Photomatix and FDRCompressor. See HDR compression for a comparison.

For Linux there are several open source command line tools available as part of pfstmo that implement different tone mapping algorithms.

There are several panoramic tools that can handle HDR images: enblend, hugin and nona can work with HDR images of different flavours. PTViewer 3.1 can display HDR images with adaptive dynamic range directly.