Developer Reference

  • 2020
  • 07/15/2020
  • Public Content
Contents

FastMarching

Calculates distance transform to closest zero pixel for all non-zero pixels of source image using fast marching method.

Syntax

IppStatus ippiFastMarching_8u32f_C1R(const Ipp8u*
pSrc
, int
srcStep
, Ipp32f*
pDst
, int
dstStep
, IppiSize
roiSize
, Ipp32f
radius
, Ipp8u*
pBuffer
);
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
pSrc
Pointer to the source image ROI.
srcStep
Distance in bytes between starts of consecutive lines in the source image.
pDst
Pointer to the destination image ROI.
dstStep
Distance in bytes between starts of consecutive lines in the destination image.
roiSize
Size of the source and destination image ROI.
radius
Radius of the neighborhood of the marked area.
pBuffer
Pointer to the working buffer.
Description
This function operates with ROI (see Regions of Interest in Intel IPP ).
This function computes the distance from the closest zero pixel to each image pixel according to the Fast Marching Method (FMM) [ Telea04 ]. The FMM distance for area Ω with the border ∂Ω is a solution of the equations:
The resulting distance complies with the equation
Here {
u
1
,
v
1
} and {
u
2
,
v
2
} are coordinates for pair of pixels adjacent to the pixel with {
x, y
} coordinates.
The area
Ω
is defined by the non-zero pixel of the image
pSrc
. If
raduis
is positive, then the FMM distance with the negative sign is calculated in Euclidean
raduis
-neighborhood of
Ω
.
The function requires the working buffer
pBuffer
whose size should be computed by the function FastMarchingGetBufferSize beforehand.
Figure
“Result of the FFM Method
shows the result of the fast marching method for the 7x9 image with centered 3x5 non-zero mask and
raduis
=1.
Result of the FFM Method
0.0000 0.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 0.0000 0.0000 0.0000 0.7071 -1.e-10 -1.e-10 -1.e-10 -1.e-10 -1.e-10 0.7071 -1.0000 -1.0000 -1.e-10 0.7071 0.9659 0.9994 0.9659 0.7071 -1.e-10 -1.0000 -1.0000 -1.e-10 0.9659 1.6730 1.9579 1.6730 0.9659 -1.e-10 -1.0000 -1.0000 -1.e-10 0.7071 0.9659 0.9994 0.9659 0.7071 -1.e-10 -1.0000 0.0000 0.7071 -1.e-10 -1.e-10 -1.e-10 -1.e-10 -1.e-10 0.7071 -1.0000 0.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 0.0000
Return Values
ippStsNoErr
Indicates no error. Any other value indicates an error or a warning.
ippStsNullPtrErr
Indicates an error condition if one of the specified pointers is
NULL
.
ippStsSizeErr
Indicates an error condition if
roiSize
has a field with zero or negative value.
ippStsStepErr
Indicates an error condition if
srcStep
or
dstStep
is less than
roiSize.width
* <
pixelSize
>.
ippStsNotEvenStepErr
Indicates an error condition if the step value is not divisible by 4 for floating-point images.
ippStsBadArgErr
Indicates an error condition if
raduis
is negative.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804