height_width_ratio height_width_ratio HeightWidthRatio HeightWidthRatio height_width_ratio (算子名称)
名称
height_width_ratio height_width_ratio HeightWidthRatio HeightWidthRatio height_width_ratio
— Compute the width, height, and aspect ratio of the surrounding
rectangle parallel to the coordinate axes.
参数签名
def height_width_ratio (区域 : HObject) -> Tuple[Sequence[int], Sequence[int], Sequence[float]]
def height_width_ratio_s (区域 : HObject) -> Tuple[int, int, float]
描述
The operator height_width_ratio height_width_ratio HeightWidthRatio HeightWidthRatio HeightWidthRatio height_width_ratio
calculates the surrounding
rectangle of all input regions (parallel to the coordinate axes).
The surrounding rectangle is described by the coordinates of the
corner pixels
(Row1 Row1 Row1 Row1 row1 row_1
,Column1 Column1 Column1 Column1 column1 column_1
,Row2 Row2 Row2 Row2 row2 row_2
,Column2 Column2 Column2 Column2 column2 column_2
)
(see smallest_rectangle1 smallest_rectangle1 SmallestRectangle1 SmallestRectangle1 SmallestRectangle1 smallest_rectangle1
). Based on these values,
height_width_ratio height_width_ratio HeightWidthRatio HeightWidthRatio HeightWidthRatio height_width_ratio
computes the width, height, and aspect
ratio of the smallest surrounding rectangle as follows:
If more than one region is passed in 区域 区域 区域 区域 区域 区域
, the results
are stored in tuples in the same order as the respective regions in
the 区域 区域 区域 区域 区域 区域
. In case of empty regions, all parameters have
the value 0 if no other behavior was set (see set_system set_system SetSystem SetSystem SetSystem set_system
).
运行信息
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Automatically parallelized on tuple level.
参数表
区域 区域 区域 区域 区域 区域
(input_object) region(-array) →
object HRegion HObject HRegion Hobject
Regions to be examined.
Height Height Height Height height height
(output_control) extent.y(-array) →
HTuple Sequence[int] HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Height of the surrounding rectangle of the region.
Width Width Width Width width width
(output_control) extent.x(-array) →
HTuple Sequence[int] HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Width of the surrounding rectangle of the region.
Ratio Ratio Ratio Ratio ratio ratio
(output_control) real(-array) →
HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Aspect ratio of the surrounding rectangle of the region.
Complexity
If F is the area of the region the mean runtime complexity is
O(sqrt(F)).
结果
The operator height_width_ratio height_width_ratio HeightWidthRatio HeightWidthRatio HeightWidthRatio height_width_ratio
returns the value 2 (
H_MSG_TRUE )
if
the input is not empty. The behavior in case of empty input (no
input regions available) is set via the operator
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>)
. The behavior in
case of empty region (the region is the empty set) is set via
set_system('empty_region_result',<Result>) set_system("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) set_system("empty_region_result",<Result>)
. If necessary an
exception is raised.
可能的前置算子
threshold threshold Threshold Threshold Threshold threshold
,
regiongrowing regiongrowing Regiongrowing Regiongrowing Regiongrowing regiongrowing
,
connection connection Connection Connection Connection connection
,
runlength_features runlength_features RunlengthFeatures RunlengthFeatures RunlengthFeatures runlength_features
可替代算子
smallest_rectangle1 smallest_rectangle1 SmallestRectangle1 SmallestRectangle1 SmallestRectangle1 smallest_rectangle1
,
smallest_rectangle2 smallest_rectangle2 SmallestRectangle2 SmallestRectangle2 SmallestRectangle2 smallest_rectangle2
,
region_features region_features RegionFeatures RegionFeatures RegionFeatures region_features
参考其它
select_shape select_shape SelectShape SelectShape SelectShape select_shape
,
smallest_circle smallest_circle SmallestCircle SmallestCircle SmallestCircle smallest_circle
,
elliptic_axis elliptic_axis EllipticAxis EllipticAxis EllipticAxis elliptic_axis
,
area_center area_center AreaCenter AreaCenter AreaCenter area_center
模块
Foundation