Rank NodeThe Rank node is a versatile filter that is commonly used to suppress noise. The Rank node is a neighborhood operator; that is, the values of neighboring pixels influence the output value of the pixel being processed. Essentially, the Rank node ranks the pixels in order of importance based on the operation being performed. The Rank node enables you to specify parameters that affect how each pixel is processed, including:
Selecting a Noise Reduction OperationThe choice of filter operation to use for noise reduction depends on the degree and character of the noise. As a general guideline, it is best to use the option that will create the fewest image artifacts and still produce an acceptable level of noise reduction.
To remove spot noise, "Threshold Replace (with avg)" is effective. For more information about this option, see the "Threshold (%)" parameter description. If the noise problem is more extensive, try using "Remove Bright Noise (maximin)" or "Remove Dark Noise (minimax)":
For more comprehensive noise reduction, before resorting to the Median operation, try using "Average of maximin and minimax." As the name implies, this operation calculates both a maximin and a minimax for each pixel and uses the average of the two as the output value.
Rank Edge OperatorsThe Rank Operation parameter includes two options for modifying edges: "Min Pixel Value (Erode)" and "Max Pixel Value (Dilate)." However, if you need to shrink and grow edges with subpixel accuracy, use the Erode/Dilate Node instead. Rank Parameter Tab![]() Operation MenuThe Operation parameter enables you to specify the type of operation to be performed by selecting one of the following options from the popup menu:
Filter CoverageThe Filter Coverage parameter provides two choices for defining the shape of the operation area: Box and Cross. (The size of the area is specified in the Filter Width parameter.) BoxThis option, which is the default, specifies a square grid of pixels. Box is the recommended option for edge operations such as Min Pixel Value and Max Pixel Value. CrossThis option specifies a cross-shaped area consisting of a horizontal and a vertical line of pixels, with the two lines intersecting at the pixel currently being processed. Try the Cross option first when using the noise suppression operations as it may reduce unwanted blurring while still proving effective at removing noise. Filter Width / PixelsThe Filter Width parameter enables you to specify the size of the operation area, either as a percentage of the width of the image (using the Filter Width tuner) or as a specific number of pixels (using the associated Pixels data entry field). You can set the Filter Width tuner by entering a value into the data entry field or by using the mouse to set the tuner to the desired value. When you set the Filter Width tuner, the value in the Pixels field will update accordingly. When entering specific values into the Pixels field, you must enter an odd number (if you do enter an even number, Chalice automatically adjusts the value to the next lower odd value). A value of 3, for example, specifies a 3 x 3 pixel grid, assuming that the Box option is selected in the Filter Coverage parameter. Threshold (%)This parameter becomes active when "Threshold Replace (with avg)" is chosen from the Operation menu. Threshold Replace is a good choice for removing spot noise without introducing excessive blurring to the result. The Threshold Replace operation calculates the average of all the pixel values in the operation area and compares this average value to the value of the central pixel (the pixel currently being processed). If the difference between the two is greater than the threshold value specified in the Threshold (%) parameter, the value of the central pixel is replaced by the average value. The default Threshold value is 0.1, or 10 percent. RankThis parameter becomes active when "Specify Pixel Rank" is chosen from the Operation menu. The Pixel Rank operation sorts, or ranks, each pixel in the operation area by value, from lowest to highest, and assigns the value of one of these pixels to the pixel currently being processed. The pixel to use for the value is determined by its rank, expressed as a number in the range of 0-1, which you specify in the Rank parameter. For example, if you specify 0.5 in the Rank parameter, the median pixel value in the ranking is assigned as the output pixel value.
BorderWhen using a neighborhood operator, the pixel currently being modified is in the center of a grid of pixels that define the operation area. Therefore, when processing a pixel that borders the image (or when the operation area is sufficiently large), there will not be adjacent pixels on all sides to contribute values to the calculation. The Border parameter enables you to specify how border pixels should be treated by selecting one of the following options from the Border popup menu:
Channel MaskThe 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 ParametersThe 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 ." |