regiongrowing regiongrowing Regiongrowing Regiongrowing regiongrowing (算子)
名称
regiongrowing regiongrowing Regiongrowing Regiongrowing regiongrowing — 使用区域生长对图像进行分割。
签名
Herror regiongrowing (const Hobject Image , Hobject* Regions , const Hlong RasterHeight , const Hlong RasterWidth , double Tolerance , const Hlong MinSize )
Herror T_regiongrowing (const Hobject Image , Hobject* Regions , const Htuple RasterHeight , const Htuple RasterWidth , const Htuple Tolerance , const Htuple MinSize )
void Regiongrowing (const HObject& Image , HObject* Regions , const HTuple& RasterHeight , const HTuple& RasterWidth , const HTuple& Tolerance , const HTuple& MinSize )
HRegion HImage ::Regiongrowing (Hlong RasterHeight , Hlong RasterWidth , const HTuple& Tolerance , Hlong MinSize ) const
HRegion HImage ::Regiongrowing (Hlong RasterHeight , Hlong RasterWidth , double Tolerance , Hlong MinSize ) const
static void HOperatorSet .Regiongrowing (HObject image , out HObject regions , HTuple rasterHeight , HTuple rasterWidth , HTuple tolerance , HTuple minSize )
HRegion HImage .Regiongrowing (int rasterHeight , int rasterWidth , HTuple tolerance , int minSize )
HRegion HImage .Regiongrowing (int rasterHeight , int rasterWidth , double tolerance , int minSize )
描述
regiongrowing regiongrowing Regiongrowing Regiongrowing Regiongrowing regiongrowing segments images into regions of the same
intensity - rastered into rectangles of size RasterHeight RasterHeight RasterHeight RasterHeight rasterHeight raster_height
RasterWidth RasterWidth RasterWidth RasterWidth rasterWidth raster_width . In order to decide
whether two adjacent rectangles belong to the same region only the
gray value of their center points is used. If the gray value
difference is less then or equal to Tolerance Tolerance Tolerance Tolerance tolerance tolerance the rectangles
are merged into one region.
If
and
are two gray values to be examined,
they are merged into the same region if:
For images of type 'cyclic', the following formulas are used:
For rectangles larger than one pixel, usually the images should be
smoothed with a lowpass filter with a size of at least RasterHeight RasterHeight RasterHeight RasterHeight rasterHeight raster_height
RasterWidth RasterWidth RasterWidth RasterWidth rasterWidth raster_width before calling regiongrowing regiongrowing Regiongrowing Regiongrowing Regiongrowing regiongrowing
(so that the gray values at the centers of the rectangles are
“representative” for the whole rectangle).
If the image contains little noise and the rectangles are small, the
smoothing can be omitted in many cases.
The resulting regions are collections of rectangles of the chosen
size RasterHeight RasterHeight RasterHeight RasterHeight rasterHeight raster_height
RasterWidth RasterWidth RasterWidth RasterWidth rasterWidth raster_width .
Only regions containing at least MinSize MinSize MinSize MinSize minSize min_size points are
returned.
Regiongrowing is a very fast operation, and thus suited for
time-critical applications.
注意
RasterWidth RasterWidth RasterWidth RasterWidth rasterWidth raster_width and RasterHeight RasterHeight RasterHeight RasterHeight rasterHeight raster_height are automatically converted to
odd values if necessary.
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
在元组级别上自动并行化。
参数
Image Image Image Image image image (输入对象) singlechannelimage(-array) → object HImage HObject HImage Hobject (byte / direction / cyclic / int1 / int2 / int4 / real)
输入图像。
Regions Regions Regions Regions regions regions (输出对象) region-array → object HRegion HObject HRegion Hobject *
Segmented regions.
RasterHeight RasterHeight RasterHeight RasterHeight rasterHeight raster_height (输入控制) extent.y → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Vertical distance between tested pixels (height of the
raster).
默认值:
3
建议值:
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21
值范围:
1
≤
RasterHeight
RasterHeight
RasterHeight
RasterHeight
rasterHeight
raster_height
≤
99 (lin)
最小增量:
2
建议增量:
2
限制:
RasterHeight >= 1 && odd(RasterHeight)
RasterWidth RasterWidth RasterWidth RasterWidth rasterWidth raster_width (输入控制) extent.x → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Horizontal distance between tested pixels (height of the
raster).
默认值:
3
建议值:
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21
值范围:
1
≤
RasterWidth
RasterWidth
RasterWidth
RasterWidth
rasterWidth
raster_width
≤
99 (lin)
最小增量:
2
建议增量:
2
限制:
RasterWidth >= 1 && odd(RasterWidth)
Tolerance Tolerance Tolerance Tolerance tolerance tolerance (输入控制) number → HTuple Union[int, float] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Points with a gray value difference less then or equal
to tolerance are accumulated into the same object.
默认值:
6.0
建议值:
1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 12.0, 14.0, 18.0, 25.0
值范围:
0
≤
Tolerance
Tolerance
Tolerance
Tolerance
tolerance
tolerance
(lin)
最小增量:
0.01
建议增量:
1.0
MinSize MinSize MinSize MinSize minSize min_size (输入控制) integer → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Minimum size of the output regions.
默认值:
100
建议值:
1, 5, 10, 20, 50, 100, 200, 500, 1000
值范围:
1
≤
MinSize
MinSize
MinSize
MinSize
minSize
min_size
最小增量:
1
建议增量:
5
示例(HDevelop)
read_image(Image,'fabrik')
mean_image(Image,Mean,RasterHeight,RasterWidth)
regiongrowing(Mean,Result,RasterHeight,RasterWidth,6.0,100)
示例(C)
read_image(&Image,"fabrik");
mean_image(Image,&Mean,RasterHeight,RasterWidth);
regiongrowing(Mean,&Result,RasterHeight,RasterWidth,6,100);
示例(HDevelop)
read_image(Image,'fabrik')
mean_image(Image,Mean,RasterHeight,RasterWidth)
regiongrowing(Mean,Result,RasterHeight,RasterWidth,6.0,100)
示例(HDevelop)
read_image(Image,'fabrik')
mean_image(Image,Mean,RasterHeight,RasterWidth)
regiongrowing(Mean,Result,RasterHeight,RasterWidth,6.0,100)
示例(HDevelop)
read_image(Image,'fabrik')
mean_image(Image,Mean,RasterHeight,RasterWidth)
regiongrowing(Mean,Result,RasterHeight,RasterWidth,6.0,100)
复杂度
Let N be the number of found regions and M the number of points
in one of these regions. Then the runtime complexity is
O(N * log(M) * M).
结果
regiongrowing regiongrowing Regiongrowing Regiongrowing Regiongrowing regiongrowing 在所有参数正确时返回 2 ( H_MSG_TRUE )。 The behavior with respect to the input images and output
regions can be determined by setting the values of the flags
'no_object_result' "no_object_result" "no_object_result" "no_object_result" "no_object_result" "no_object_result" , 'empty_region_result' "empty_region_result" "empty_region_result" "empty_region_result" "empty_region_result" "empty_region_result" , and
'store_empty_region' "store_empty_region" "store_empty_region" "store_empty_region" "store_empty_region" "store_empty_region" with set_system set_system SetSystem SetSystem SetSystem set_system 。如有必要,则抛出异常。
可能的前趋
binomial_filter binomial_filter BinomialFilter BinomialFilter BinomialFilter binomial_filter ,
mean_image mean_image MeanImage MeanImage MeanImage mean_image ,
gauss_filter gauss_filter GaussFilter GaussFilter GaussFilter gauss_filter ,
smooth_image smooth_image SmoothImage SmoothImage SmoothImage smooth_image ,
median_image median_image MedianImage MedianImage MedianImage median_image ,
anisotropic_diffusion anisotropic_diffusion AnisotropicDiffusion AnisotropicDiffusion AnisotropicDiffusion anisotropic_diffusion
可能的后继
select_shape select_shape SelectShape SelectShape SelectShape select_shape ,
reduce_domain reduce_domain ReduceDomain ReduceDomain ReduceDomain reduce_domain ,
select_gray select_gray SelectGray SelectGray SelectGray select_gray
替代
regiongrowing_n regiongrowing_n RegiongrowingN RegiongrowingN RegiongrowingN regiongrowing_n ,
regiongrowing_mean regiongrowing_mean RegiongrowingMean RegiongrowingMean RegiongrowingMean regiongrowing_mean ,
label_to_region label_to_region LabelToRegion LabelToRegion LabelToRegion label_to_region
模块
基础