hamming_distance_norm hamming_distance_norm HammingDistanceNorm HammingDistanceNorm hamming_distance_norm (Operator)
名称
hamming_distance_norm hamming_distance_norm HammingDistanceNorm HammingDistanceNorm hamming_distance_norm — Hamming distance between two regions using normalization.
签名
void HammingDistanceNorm (const HObject& Regions1 , const HObject& Regions2 , const HTuple& Norm , HTuple* Distance , HTuple* Similarity )
HTuple HRegion ::HammingDistanceNorm (const HRegion& Regions2 , const HTuple& Norm , HTuple* Similarity ) const
Hlong HRegion ::HammingDistanceNorm (const HRegion& Regions2 , const HString& Norm , double* Similarity ) const
Hlong HRegion ::HammingDistanceNorm (const HRegion& Regions2 , const char* Norm , double* Similarity ) const
Hlong HRegion ::HammingDistanceNorm (const HRegion& Regions2 , const wchar_t* Norm , double* Similarity ) const
(
Windows only)
def hamming_distance_norm (regions_1 : HObject, regions_2 : HObject, norm : MaybeSequence[str]) -> Tuple[Sequence[int], Sequence[float]]
def hamming_distance_norm_s (regions_1 : HObject, regions_2 : HObject, norm : MaybeSequence[str]) -> Tuple[int, float]
描述
The operator hamming_distance_norm hamming_distance_norm HammingDistanceNorm HammingDistanceNorm HammingDistanceNorm hamming_distance_norm returns the hamming distance
between two regions,
i.e., the number of pixels of the regions which are different
(Distance Distance Distance Distance distance distance ).
Before calculating the difference the region in
Regions1 Regions1 Regions1 Regions1 regions1 regions_1 is normalized onto
the regions in Regions2 Regions2 Regions2 Regions2 regions2 regions_2 .
The result is the number of pixels contained in one region
but not in the other:
The parameter Similarity Similarity Similarity Similarity similarity similarity describes the similarity between the
two regions based on the hamming distance Distance Distance Distance Distance distance distance :
The following types of normalization are available:
'center' "center" "center" "center" "center" "center" :
The region is moved so that both regions have the save center
of gravity.
If both regions are empty Similarity Similarity Similarity Similarity similarity similarity is set to 0.
The regions with the same index from both input parameters are
always compared.
注意
In both input parameters the same number of
regions must be passed.
执行信息
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Automatically parallelized on tuple level.
参数
Regions1 Regions1 Regions1 Regions1 regions1 regions_1 (input_object) region(-array) → object HRegion HObject HRegion Hobject
Regions to be examined.
Regions2 Regions2 Regions2 Regions2 regions2 regions_2 (input_object) region(-array) → object HRegion HObject HRegion Hobject
Comparative regions.
Norm Norm Norm Norm norm norm (input_control) string(-array) → HTuple MaybeSequence[str] HTuple Htuple (string) (string ) (HString ) (char* )
Type of normalization.
默认值:
'center'
"center"
"center"
"center"
"center"
"center"
值列表:
'center' "center" "center" "center" "center" "center"
Distance Distance Distance Distance distance distance (output_control) integer(-array) → HTuple Sequence[int] HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Hamming distance of two regions.
Assertion:
Distance >= 0
Similarity Similarity Similarity Similarity similarity similarity (output_control) real(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Similarity of two regions.
Assertion:
0 <= Similarity && Similarity <= 1
Complexity
If F is the area of a region the mean runtime
complexity is O(sqrt(F)).
结果
hamming_distance_norm returns the value 2 (
H_MSG_TRUE )
if the number of objects in
both parameters is the same and is not 0.
The behavior in case of empty input (no input objects 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
替代算子
intersection intersection Intersection Intersection Intersection intersection ,
complement complement Complement Complement Complement complement ,
area_center area_center AreaCenter AreaCenter AreaCenter area_center
另见
hamming_change_region hamming_change_region HammingChangeRegion HammingChangeRegion HammingChangeRegion hamming_change_region
模块
Foundation