Developer Reference

  • 2021
  • 03/26/2021
  • Public Content
Contents

GetDistanceTransformMask

Returns an optimal mask for a given type of metrics and given mask size.

Syntax

IppStatus ippiGetDistanceTransformMask_<mod>(int
kerSize
, IppiNorm
norm
, Ipp<datatype>*
pMetrics
);
Supported values for
mod
:
32s
32f
IppStatus ippiGetDistanceTransformMask(int
maskType
, Ipp32f*
pMetrics
);
Include Files
ippcv.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
,
ippi.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
,
ippi.lib
Parameters
kerSize
Specifies the mask size as follows: 3 for 3x3 mask, 5 for 5x5 mask.
norm
Specifies the type of metrics. Possible values are:
ippiNormInf
(0)
L
, Δ = max(|x
1
- x
2
|, |y
1
- y2|),
ippiNormL1
(1)
L
1
, Δ = |x
1
- x
2
| + |y
1
- y2|,
ippiNormL2
(2)
L2, Δ = sqrt((x
1
- x
2
)
2
+ (y
1
- y
2
)
2
)
maskType
Distance type.
pMetrics
Pointer to the output array to store metrics parameters. The array contains the following number of elements:
2
for 3x3 mask,
3
for 5x5 mask.
Description
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)
L
1
, 3x3 mask,
(2, 3)
L
2
, 3x3 mask,
32s
data type,
(0.955, 1.3693)
L
2
, 3x3 mask,
32f
data type,
(1, 1, 2)
L
, 5x5 mask,
(1, 2, 3)
L
1
, 5x5 mask,
(4, 6, 9)
L
2
, 5x5 mask,
32s
data type,
(1.0, 1.4, 2.1969)
L
2
, 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.
Return Values
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.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.