Unsharp Mask Node

The Unsharp Mask node sharpens an image by increasing the contrast between adjacent pixels in those areas with the greatest visual detail.

The process involves three steps:

  • First, a low-pass convolution filter is used to blur the source image.
  • Second, the blurred image is subtracted from the source image. In effect, the blurred image is used as a mask to perform edge detection on the original image (hence the term "unsharp mask").
  • Third, the result of the unsharp mask operation is added to the source image.

The convolution used for the blur modifies each pixel in the image, in turn, based on the values of surrounding pixels. The matrix that delineates this pixel area is known as a kernel.

The Unsharp Mask node provides parameters that enable you to define the kernel attributes and thus control the blur. You can control the contribution of the unsharp mask to the source image by using the Mix parameter.

Unsharp Mask Parameter Tab

Kernel Size

The Kernel Size parameter enables you to specify the number of adjacent pixels whose values will be used to modify the current pixel. The size parameter is expressed as a percentage of the total number of pixels in the image.

You set this parameter by keying a value in the range of 0 to 1 into the data entry field or by using the mouse to set the tuner to the desired value. A value of 0 would leave the image unmodified by the convolution. A value of 1 would specify a kernel the size of the image, so that every pixel in the image would contribute to the modification of the current pixel. In most cases you will select values within a narrow range of the low end of the scale.

Kernel Type

The Kernel Type parameter features a popup menu that allows you to choose whether Chalice should use Integer or Floating Point math for the calculation. Integer is the default, unless you choose Cubic for the Kernel Shape parameter, in which case the Kernel Type parameter defaults to Floating Point. Integer precision restraints make it inefficient to compute the Cubic function using integer math.

Kernel Shape

The Kernel Shape parameter enables you to determine the extent to which each adjacent pixel in the kernel will contribute to the convolution by choosing a function that describes the distribution curve used to weight the sample.

You can select one of the following functions from the Kernel Shape popup menu: Constant, Linear, Quadratic, Cubic, or Gaussian.

The Constant function, for example, is equivalent to a box filter and applies the same weight to every cell (pixel) value in the kernel when it is factored. The weighting distribution becomes more complex as you select the other functions: Linear is equivalent to a triangle filter, and so on, with Gaussian being the most complex option and therefore the most computationally intensive.

The optimal choice will depend on the nature of the source image, the effect you wish to achieve, and how much time you are willing to devote to processing.

Edge Mode

By the nature of this convolve operation, the pixel currently being modified is in the center of the cell matrix that composes the kernel. Therefore, when convolving a pixel that borders the image (or when the kernel is large), there will not be adjacent pixels on all sides to contribute values to the convolution.

The Edge Mode parameter enables you to assign pixel values to these "empty" kernel cells by selecting one of the following options from a popup menu:

  • Border: This option, which is the default setting, assigns the values of the edge pixels to the kernel cells that fall outside the image borders.
  • Black: This option assigns a value of 0 to kernel cells outside the image borders.
  • Mirror: This option assigns the values of the inner adjacent pixels to the corresponding kernel cells that fall outside the image borders.

Mix

The Mix parameter enables you to specify the extent to which the source image is modified by the unsharp mask by keying a value in the range of 0 to 1 into the data entry field or by using the mouse to set the tuner to the desired value.

The range represents the percentage of the unsharp mask you wish to be added to the source image. A value of 0 would result in no modification. A value of 1 would add 100 percent of the value of the mask to the source image.

Channel Mask

The Channel Mask parameter enables you to inhibit the modification of any channel by deselecting the Red, Green, Blue, Alpha, or Other channel icons.

Control Image Parameters

The Control Action and Control Channel menus enable you to specify how an optional control image input will govern the node operation, as explained in "Using Control Images with Filter Nodes ."




Table of Contents | Index



Copyright 1996-1999 by Silicon Grail Corporation