Calculates distance transform to closest zero pixel for all non-zero pixels of source image using fast marching method.
IppStatus ippiFastMarching_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, Ipp32f radius, Ipp8u* pBuffer);
The function ippiFastMarching is declared in the ippcv.h It 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 {u1, v1} and {u2, v2} 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 ippiFastMarchingGetBufferSize 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.
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
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. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.