label_to_regionlabel_to_regionLabelToRegionLabelToRegionlabel_to_region (算子)
名称
label_to_regionlabel_to_regionLabelToRegionLabelToRegionlabel_to_region — 从图像中提取具有相等灰度值的区域。
签名
描述
label_to_regionlabel_to_regionLabelToRegionLabelToRegionLabelToRegionlabel_to_region segments an image into regions of equal
gray value. One output region is generated for each gray value
occurring in the image. This is similar to calling
thresholdthresholdThresholdThresholdThresholdthreshold multiple times, and accumulating the results
with concat_objconcat_objConcatObjConcatObjConcatObjconcat_obj。Another related operator is
regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing。However, label_to_regionlabel_to_regionLabelToRegionLabelToRegionLabelToRegionlabel_to_region
does not perform a connectionconnectionConnectionConnectionConnectionconnection operation on the resulting
regions, i.e., they may be disconnected. A typical application of
label_to_regionlabel_to_regionLabelToRegionLabelToRegionLabelToRegionlabel_to_region is the segmentation of label images,
hence its name.
The number of output regions is limited by the system parameter
'max_outp_obj_par'"max_outp_obj_par""max_outp_obj_par""max_outp_obj_par""max_outp_obj_par""max_outp_obj_par", which can be read via
get_system(::'max_outp_obj_par':<number>)get_system("max_outp_obj_par",<number>)GetSystem("max_outp_obj_par",<number>)GetSystem("max_outp_obj_par",<number>)GetSystem("max_outp_obj_par",<number>)get_system("max_outp_obj_par",<number>)。
注意
label_to_regionlabel_to_regionLabelToRegionLabelToRegionLabelToRegionlabel_to_region is not implemented for images of type
real. The input images must not contain negative gray values.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
参数
LabelImageLabelImageLabelImageLabelImagelabelImagelabel_image (输入对象) singlechannelimage(-array) → objectHImageHObjectHImageHobject (byte / int2 / int4 / int8)
Label image.
RegionsRegionsRegionsRegionsregionsregions (输出对象) region-array → objectHRegionHObjectHRegionHobject *
Regions having a constant gray value.
复杂度
Let x1 be the minimum x-coordinate, x2 the maximum x-coordinate,
y1 be the minimum y-coordinate, and y2 the maximum y-coordinate
of a particular gray value. Furthermore, let N be the number of
different gray values in the image. Then the runtime complexity is
O(N * (x2 - x1 + 1) * (y2 - y1 + 1))
结果
label_to_regionlabel_to_regionLabelToRegionLabelToRegionLabelToRegionlabel_to_region returns 2 (
H_MSG_TRUE)
if the gray values lie
within a correct range. 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_systemset_systemSetSystemSetSystemSetSystemset_system。如有必要,则抛出异常。
可能的前趋
min_max_graymin_max_grayMinMaxGrayMinMaxGrayMinMaxGraymin_max_gray,
sobel_ampsobel_ampSobelAmpSobelAmpSobelAmpsobel_amp,
binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter,
gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain,
diff_of_gaussdiff_of_gaussDiffOfGaussDiffOfGaussDiffOfGaussdiff_of_gauss
可能的后继
connectionconnectionConnectionConnectionConnectionconnection,
dilation1dilation1Dilation1Dilation1Dilation1dilation1,
erosion1erosion1Erosion1Erosion1Erosion1erosion1,
openingopeningOpeningOpeningOpeningopening,
closingclosingClosingClosingClosingclosing,
rank_regionrank_regionRankRegionRankRegionRankRegionrank_region,
shape_transshape_transShapeTransShapeTransShapeTransshape_trans,
skeletonskeletonSkeletonSkeletonSkeletonskeleton
另见
thresholdthresholdThresholdThresholdThresholdthreshold,
concat_objconcat_objConcatObjConcatObjConcatObjconcat_obj,
regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing,
region_to_labelregion_to_labelRegionToLabelRegionToLabelRegionToLabelregion_to_label
模块
基础