roundnessroundnessRoundnessRoundnessroundness (算子名称)

名称

roundnessroundnessRoundnessRoundnessroundness — Shape factors from contour.

参数签名

roundness(区域 : : : Distance, Sigma, Roundness, Sides)

Herror roundness(const Hobject 区域, double* Distance, double* Sigma, double* Roundness, double* Sides)

Herror T_roundness(const Hobject 区域, Htuple* Distance, Htuple* Sigma, Htuple* Roundness, Htuple* Sides)

void Roundness(const HObject& 区域, HTuple* Distance, HTuple* Sigma, HTuple* Roundness, HTuple* Sides)

HTuple HRegion::Roundness(HTuple* Sigma, HTuple* Roundness, HTuple* Sides) const

double HRegion::Roundness(double* Sigma, double* Roundness, double* Sides) const

static void HOperatorSet.Roundness(HObject 区域, out HTuple distance, out HTuple sigma, out HTuple roundness, out HTuple sides)

HTuple HRegion.Roundness(out HTuple sigma, out HTuple roundness, out HTuple sides)

double HRegion.Roundness(out double sigma, out double roundness, out double sides)

def roundness(区域: HObject) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

def roundness_s(区域: HObject) -> Tuple[float, float, float, float]

描述

该算子 roundnessroundnessRoundnessRoundnessRoundnessroundness examines the distance between the contour and the center of the area. In particular the mean distance (DistanceDistanceDistanceDistancedistancedistance), the deviation from the mean distance (SigmaSigmaSigmaSigmasigmasigma) and two shape features derived therefrom are determined. RoundnessRoundnessRoundnessRoundnessroundnessroundness is the relation between mean value and standard deviation, and SidesSidesSidesSidessidessides indicates the number of polygon pieces if a regular polygon is concerned.

In the documentation of this chapter (Regions / Features), you can find an image illustrating regions which vary in their mean distance, distance deviation, roundness and number of polygon pieces.

The contour for calculating the features is determined depending on the global neighborhood (see set_systemset_systemSetSystemSetSystemSetSystemset_system).

Calculation:

If p is the center of the area, the pixels and F the area of the contour.

If more than one region is passed the results are stored in tuples, the index of a value in the tuple corresponding to the index of a region in the input.

In case of empty region all parameters have the value 0.0 if no other behavior was set (see set_systemset_systemSetSystemSetSystemSetSystemset_system).

运行信息

参数表

区域区域区域区域区域区域 (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Region(s) to be examined.

DistanceDistanceDistanceDistancedistancedistance (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Mean distance from the center.

Assertion: Distance >= 0.0

SigmaSigmaSigmaSigmasigmasigma (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Standard deviation of DistanceDistanceDistanceDistancedistancedistance.

Assertion: Sigma >= 0.0

RoundnessRoundnessRoundnessRoundnessroundnessroundness (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Shape factor for roundness.

Assertion: Roundness <= 1.0

SidesSidesSidesSidessidessides (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Number of polygon sides.

Assertion: Sides >= 0

Complexity

If F is the area of a region the mean runtime complexity is O(sqrt(F)).

结果

该算子 roundnessroundnessRoundnessRoundnessRoundnessroundness 返回值 2 ( H_MSG_TRUE) if the input is not empty. The behavior in case of empty input (no input regions available) is set via 该算子 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 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.

可能的前置算子

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

可替代算子

compactnesscompactnessCompactnessCompactnessCompactnesscompactness

参考其它

contlengthcontlengthContlengthContlengthContlengthcontlength

References

R. Haralick, L. Shapiro “Computer and Robot Vision” Addison-Wesley, 1992, pp. 61

模块

Foundation