runlength_distributionT_runlength_distributionRunlengthDistributionRunlengthDistributionrunlength_distribution(算子)
名称
runlength_distributionT_runlength_distributionRunlengthDistributionRunlengthDistributionrunlength_distribution — 区域游程编码所需的游程分布。
签名
def runlength_distribution(region: HObject) -> Tuple[Sequence[int], Sequence[int]]
描述
算子 runlength_distributionrunlength_distributionRunlengthDistributionRunlengthDistributionRunlengthDistributionrunlength_distribution calculates the
distribution of the runs of a region of the fore- and
background. The frequency of the occurrence of a certain
length is calculated. Runs of infinite length are not counted.
Therefore the background are the holes of the region.
As many values are passed as set by the maximum
length of fore- or background, respectively.
The length of both tuples usually differs.
The first entry of the tuples is always 0
(no runs of the length 0).
If there are no blanks the empty tuple is passed
at BackgroundBackgroundBackgroundBackgroundbackgroundbackground.
Analogously the empty tuple is passed in case
of an empty region at ForegroundForegroundForegroundForegroundforegroundforeground。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
RegionRegionRegionRegionregionregion (输入对象) region → objectHRegionHObjectHRegionHobject
Region to be examined.
ForegroundForegroundForegroundForegroundforegroundforeground (输出控制) integer-array → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Length distribution of the region (foreground).
BackgroundBackgroundBackgroundBackgroundbackgroundbackground (输出控制) integer-array → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Length distribution of the background.
复杂度
If n is the number of runs of the region the runtime
complexity is O(n).
结果
算子 runlength_distributionrunlength_distributionRunlengthDistributionRunlengthDistributionRunlengthDistributionrunlength_distribution 在输入不为空时返回值 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>)。If more than one region is passed an exception is raised.
可能的前趋
thresholdthresholdThresholdThresholdThresholdthreshold,
select_objselect_objSelectObjSelectObjSelectObjselect_obj
替代
runlength_featuresrunlength_featuresRunlengthFeaturesRunlengthFeaturesRunlengthFeaturesrunlength_features
另见
runlength_featuresrunlength_featuresRunlengthFeaturesRunlengthFeaturesRunlengthFeaturesrunlength_features
模块
基础