hamming_distance_norm — Hamming distance between two regions using normalization.
hamming_distance_norm returns the hamming distance
between two regions,
i.e., the number of pixels of the regions which are different
Before calculating the difference the region in
Regions1 is normalized onto
the regions in
The result is the number of pixels contained in one region
but not in the other:
Similarity describes the similarity between the
two regions based on the hamming distance
The following types of normalization are available:
The region is moved so that both regions have the save center of gravity.
If both regions are empty
Similarity is set to 0.
The regions with the same index from both input parameters are
In both input parameters the same number of regions must be passed.
Regions to be examined.
Type of normalization.
Default value: 'center'
List of values: 'center'
Hamming distance of two regions.
Distance >= 0
Similarity of two regions.
0 <= Similarity && Similarity <= 1
If F is the area of a region the mean runtime complexity is O(sqrt(F)).
hamming_distance_norm returns the value 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
The behavior in case of empty region (the region is the empty set) is set via
If necessary an exception is raised.