Returns an optimal mask for a given type of metrics and given mask size.
IppStatus ippiGetDistanceTransformMask_<mod>(int kerSize, IppiNorm norm, Ipp<datatype>* pMetrics);
Supported values for mod:
32s |
32f |
ippiNormInf(0) |
L∞, Δ = max(|x1 - x2|, |y1 - y2|), |
ippiNormL1(1) |
L1, Δ = |x1 - x2| + |y1 - y2|, |
ippiNormL2(2) |
L2, Δ = sqrt((x1 - x2)2 + (y1 - y2)2) |
2 |
for 3x3 mask, |
3 |
for 5x5 mask. |
The function ippiGetDistanceTransformMask is declared in the ippcv.h file. This function fills up the output array with metrics parameters for the given type of metrics and size of mask. The function returns the following results:
(1, 1) |
L∞, 3x3 mask, |
(1, 2) |
L1, 3x3 mask, |
(2, 3) |
L2, 3x3 mask, 32s data type, |
(0.955, 1.3693) |
L2, 3x3 mask, 32f data type, |
(1, 1, 2) |
L∞, 5x5 mask, |
(1, 2, 3) |
L1, 5x5 mask, |
(4, 6, 9) |
L2, 5x5 mask, 32s data type, |
(1.0, 1.4, 2.1969) |
L2, 5x5 mask, 32f data type. |
For more information, see [Bor86].
For compatibility with the previous versions of the library the earlier function ippiGetDistanceTransformMask replaced by the function ippiGetDistanceTransformMask_32f in the current version is also supported.
ippStsNoErr |
Indicates no error. Any other value indicates an error or a warning. |
ippStsNullPtrErr |
Indicates an error condition if pMetrics pointer is NULL. |
ippStsSizeErr |
Indicates an error condition if kerSize has a wrong value. |
ippStsBadArgErr |
Indicates an error condition if kerSize or norm has a wrong value. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.