dual_rank dual_rank DualRank DualRank dual_rank (算子)
名称
dual_rank dual_rank DualRank DualRank dual_rank — 使用圆形或矩形掩模开、中值和闭。
签名
Herror dual_rank (const Hobject Image , Hobject* ImageRank , const char* MaskType , const Hlong Radius , const Hlong ModePercent , const char* Margin )
Herror T_dual_rank (const Hobject Image , Hobject* ImageRank , const Htuple MaskType , const Htuple Radius , const Htuple ModePercent , const Htuple Margin )
void DualRank (const HObject& Image , HObject* ImageRank , const HTuple& MaskType , const HTuple& Radius , const HTuple& ModePercent , const HTuple& Margin )
HImage HImage ::DualRank (const HString& MaskType , Hlong Radius , Hlong ModePercent , const HTuple& Margin ) const
HImage HImage ::DualRank (const HString& MaskType , Hlong Radius , Hlong ModePercent , const HString& Margin ) const
HImage HImage ::DualRank (const char* MaskType , Hlong Radius , Hlong ModePercent , const char* Margin ) const
HImage HImage ::DualRank (const wchar_t* MaskType , Hlong Radius , Hlong ModePercent , const wchar_t* Margin ) const
(
Windows only)
static void HOperatorSet .DualRank (HObject image , out HObject imageRank , HTuple maskType , HTuple radius , HTuple modePercent , HTuple margin )
HImage HImage .DualRank (string maskType , int radius , int modePercent , HTuple margin )
HImage HImage .DualRank (string maskType , int radius , int modePercent , string margin )
描述
算子 dual_rank dual_rank DualRank DualRank DualRank dual_rank carries out a non-linear
transformation of the gray values of all input images
(Image Image Image Image image image ). Circles or squares can be used as structuring
elements. The operator dual_rank dual_rank DualRank DualRank DualRank dual_rank effects two
consecutive calls of rank_image rank_image RankImage RankImage RankImage rank_image 。At the first call the
range gray value is calculated with the indicated range
(ModePercent ModePercent ModePercent ModePercent modePercent mode_percent ). The result of this calculation is the
input of a further call of rank_image rank_image RankImage RankImage RankImage rank_image , this time using the
range value 100-ModePercent ModePercent ModePercent ModePercent modePercent mode_percent 。
When filtering different parameters for border treatment
(Margin Margin Margin Margin margin margin ) can be chosen:
gray value Pixels outside of the image edges
are assumed to be constant (with the
indicated gray value).
'continued' Continuation of edge pixels.
'cyclic' Cyclic continuation of image edges.
'mirrored' Reflection of pixels at the image edges.
A range filtering is calculated according to the following scheme:
The indicated mask is put over the image to be filtered in such a
way that the center of the mask touches all pixels once. For each
of these pixels all neighboring pixels covered by the mask are
sorted in an ascending sequence corresponding to their gray values.
Each sorted sequence of gray values contains the same number of gray
values like the mask has image points. The n-th highest element, (=
ModePercent ModePercent ModePercent ModePercent modePercent mode_percent , rank values between 0...100 in
percent) is selected and set as result gray value in the
corresponding result image.
If ModePercent ModePercent ModePercent ModePercent modePercent mode_percent is 0, then the operator equals to the
gray value opening (gray_opening gray_opening GrayOpening GrayOpening GrayOpening gray_opening ). If
ModePercent ModePercent ModePercent ModePercent modePercent mode_percent is 50, the operator results in the median
filter, which is applied twice (median_image median_image MedianImage MedianImage MedianImage median_image ). The
ModePercent ModePercent ModePercent ModePercent modePercent mode_percent 100 in dual_rank dual_rank DualRank DualRank DualRank dual_rank means that it
calculates the gray value closing (gray_closing gray_closing GrayClosing GrayClosing GrayClosing gray_closing ).
Choosing parameter values inside this range results in a smooth
transformation of these operators.
有关平滑滤波器概念的说明,请参阅 滤波器 / 平滑 一章的引言。
注意
请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
在元组级别上自动并行化。
在通道级别上自动并行化。
在域级别上自动并行化。
参数
Image Image Image Image image image (输入对象) (multichannel-)image(-array) → object HImage HObject HImage Hobject (byte / int2 / uint2 / int4 / real)
Image to be filtered.
ImageRank ImageRank ImageRank ImageRank imageRank image_rank (输出对象) multichannel-image(-array) → object HImage HObject HImage Hobject * (byte / int2 / uint2 / int4 / real)
滤波后的图像。
MaskType MaskType MaskType MaskType maskType mask_type (输入控制) string → HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Shape of the mask.
默认值:
'circle'
"circle"
"circle"
"circle"
"circle"
"circle"
值列表:
'circle' "circle" "circle" "circle" "circle" "circle" , 'square' "square" "square" "square" "square" "square"
Radius Radius Radius Radius radius radius (输入控制) integer → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Radius of the filter mask.
默认值:
1
建议值:
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 15, 19, 25, 31, 39, 47, 59
值范围:
1
≤
Radius
Radius
Radius
Radius
radius
radius
≤
101
最小增量:
1
建议增量:
2
ModePercent ModePercent ModePercent ModePercent modePercent mode_percent (输入控制) integer → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Filter Mode: 0 corresponds to a gray value
opening , 50 corresponds to a median and 100 to
a gray values closing.
默认值:
10
建议值:
0, 2, 5, 10, 15, 20, 40, 50, 60, 80, 85, 90, 95, 98, 100
值范围:
0
≤
ModePercent
ModePercent
ModePercent
ModePercent
modePercent
mode_percent
≤
100
最小增量:
1
建议增量:
2
Margin Margin Margin Margin margin margin (输入控制) string → HTuple Union[int, float, str] HTuple Htuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)
Border treatment.
默认值:
'mirrored'
"mirrored"
"mirrored"
"mirrored"
"mirrored"
"mirrored"
建议值:
'mirrored' "mirrored" "mirrored" "mirrored" "mirrored" "mirrored" , 'cyclic' "cyclic" "cyclic" "cyclic" "cyclic" "cyclic" , 'continued' "continued" "continued" "continued" "continued" "continued" , 0, 30, 60, 90, 120, 150, 180, 210, 240, 255
示例(HDevelop)
read_image(Image,'fabrik')
dual_rank(Image,ImageOpening,'circle',10,10,'mirrored')
dev_display(ImageOpening)
示例(C)
read_image(&Image,"fabrik");
dual_rank(Image,&ImageOpening,"circle",10,10,"mirrored");
disp_image(ImageOpening,WindowHandle);
示例(HDevelop)
read_image(Image,'fabrik')
dual_rank(Image,ImageOpening,'circle',10,10,'mirrored')
dev_display(ImageOpening)
示例(HDevelop)
read_image(Image,'fabrik')
dual_rank(Image,ImageOpening,'circle',10,10,'mirrored')
dev_display(ImageOpening)
示例(HDevelop)
read_image(Image,'fabrik')
dual_rank(Image,ImageOpening,'circle',10,10,'mirrored')
dev_display(ImageOpening)
复杂度
For each pixel:
with F =
area of the structuring element.
结果
如果参数值正确,算子 dual_rank dual_rank DualRank DualRank DualRank dual_rank 返回值 2 ( H_MSG_TRUE )。当输入为空(无可用输入图像)时可设置行为通过算子 set_system('no_object_result',<Result>) set_system("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) set_system("no_object_result",<Result>) 。如有必要,则抛出异常。
可能的前趋
read_image read_image ReadImage ReadImage ReadImage read_image
可能的后继
threshold threshold Threshold Threshold Threshold threshold ,
dyn_threshold dyn_threshold DynThreshold DynThreshold DynThreshold dyn_threshold ,
sub_image sub_image SubImage SubImage SubImage sub_image ,
regiongrowing regiongrowing Regiongrowing Regiongrowing Regiongrowing regiongrowing
替代
rank_image rank_image RankImage RankImage RankImage rank_image ,
gray_closing gray_closing GrayClosing GrayClosing GrayClosing gray_closing ,
gray_opening gray_opening GrayOpening GrayOpening GrayOpening gray_opening ,
median_image median_image MedianImage MedianImage MedianImage median_image
另见
gen_circle gen_circle GenCircle GenCircle GenCircle gen_circle ,
gen_rectangle1 gen_rectangle1 GenRectangle1 GenRectangle1 GenRectangle1 gen_rectangle1 ,
gray_erosion_rect gray_erosion_rect GrayErosionRect GrayErosionRect GrayErosionRect gray_erosion_rect ,
gray_dilation_rect gray_dilation_rect GrayDilationRect GrayDilationRect GrayDilationRect gray_dilation_rect ,
sigma_image sigma_image SigmaImage SigmaImage SigmaImage sigma_image
参考文献
W. Eckstein, O. Munkelt
“Extracting Objects from Digital Terrain Model”
Remote Sensing and Reconstruction for Threedimensional Objects and Scenes,
SPIE Symposium on Optical Science, Engeneering, and Instrumentation,
July 1995, San Diego
模块
基础