Processing: Stretching

Stretching is basically intended to spread the target object's signal over as much dynamic range as possible. The brigher portions of the signal are on the white side of the background peak so the goal is to shift them farther "whiteward" of the peak. This is done by applying a curve that boosts the input signal. How do we determine what that curve should look like?

The horizontal axis of the curves graph is the input value and the vertical axis is the output value. Let's consider a simple example in which we want to make the midpoint input value brighter, changing it from a brightness of 128 to 138. This corresponds to a point on the chart a bit above the diagonal line drawn across it. In actual stretching we're not acting only at one input value as that would cause visible artifacts, so we use a gentle curve that produces reasonably smooth changes.

At the black and white points we don't want any change, so their input and output values should be kept equal. This means that the curve we use will intersect the diagonal line at the black and white points and bow upward in between. We'll keep the bow fairly weak and stretch iteratively. Here is a typical curve:

The amount of brightening at a particular input value is given by the vertical distance between the diagonal line and the curve. In this case the maximum brightening as near the input value that the tiny black box on the curve happens to be. This curve brightens everything except its end points. Note that the bend in the curve is fairly sharp and that on either side of the bend the curve is much like a straight line. The bend is best placed at the pixel values that define the midtone part of your target object; this usually is found somewhere in the right wing of the background peak. The straight line above the bend is necessary to keep stars and their haloes from looking odd.

A curve similar to the above is often referred to as a standard curve.

The standard curve can be more aggressive by bowing it farther away from the diagonal line. (You can create a standard curve of your own and save it using the Curves dialog drop down menu's Save Preset...)

Notice that the standard curve does a lot of brightening in the right half of the chart where there's probably not going to be much signal from our target. That area is mainly where stars and their haloes are found. We might be better off if we could minimize the brightening there, so here's an alternative stretching curve:

This is a more complex curve that uses an "S" or double curve centered on the histogram peak and a linear taper to white. In a double curve like this pixels below the value at the cross-over point darken and those above brighten; the effect is to spread the peak, which is exactly what we want. The amount of right half-chart brightening for the alternative curve is less than that for the standard curve.

The disadvantage of the alternative "S" curve is that it's constantly changing. Each application of the curve will move the cross-over point rightward requiring the next curve to be different. More work for you to do, but perhaps better looking stars as a result.

By the way, don't be tempted to put a downward curve just to the right of the bendover point in order to minimize star effects. Such a bend is creates an inverted "S" curve and acts to push pixels toward a specific value. In a star's halo this could manifest itself as banding. Fine if you want to simulate Airy rings, but otherwise something to avoid!

Here's how you would use a standard curve to stretch your image:

  1. Open your image
  2. Launch the Levels dialog with Ctrl-L and adjust the black point so that it's a bit darker than the dark tail of the background peak.You can also adjust the white point so that it matches the brightest pixel in your image, but it's probably already at the correct setting of saturation. For simple processing you should leave the midpoint adjustment unchanged. Click OK to close the Levels dialog.
  3. Launch Curves with Ctrl-M and apply a standard curve. Click OK to close the Curves dialog.
  4. Launch the Levels tool with Ctrl-L and adjust the black point so that it's a bit darker than the dark tail of the background peak. Click OK to close the Levels dialog.
  5. Repeat steps 3 and 4 until the image begins to show appreciable noise. The last iteration may involve a curve that's less aggressive than the standard curve.

Curves have other uses, such as drawing out low signal portions of your image and reducing star size, but I'll leave descriptions of those to the toolbox.

Table of contents Previous Page Next Page Last Page