rank_n — 从多个通道返回具有给定秩的灰度值。
算子 rank_n returns pixel-by-pixel the result of the
rank-function over all channels.
For every pixel in the input image the following is being done: The
gray values of all channels at this position are sorted in ascending
order. Then the pixel with index RankIndex is selected and
placed in the output image at the same position. The output image
has one channel.
In the special cases RankIndex = 1 and
RankIndex = '(Number of channels)' the minimum and
maximum are returned.
RankIndex = '(Number of channels + 1) / 2'
returns the median (here, / denotes integer division).
Hence, for a five-channel image, 3 returns the median.
算子 rank_n should not be confused with the operator
rank_image which computes the rank within a certain mask.
有关平滑滤波器概念的说明,请参阅 滤波器 / 平滑 一章的引言。
请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章
Image (输入对象) (multichannel-)image(-array) → object (byte / int2 / uint2 / int4 / int8 / real)
Multichannel gray image.
RankImage (输出对象) singlechannelimage(-array) → object (byte / int2 / uint2 / int4 / int8 / real)
Result of the rank function.
RankIndex (输入控制) integer → (integer)
Rank of the gray value images to return.
默认值: 2
建议值: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20
compose5 (Image1, Image2, Image3, Image4, Image5, MultiChannelImage) rank_n (MultiChannelImage, ImageMin, 1) rank_n (MultiChannelImage, ImageMax, 5) rank_n (MultiChannelImage, ImageMedian, 3)
compose2,
compose3,
compose4,
compose5,
add_channels
基础