MorphologyInit

Initializes morphology state structure for erosion or dilation operation.

Syntax

IppStatus ippiMorphologyInit_<mod>(int roiWidth, const Ipp8u* pMask, IppiSize maskSize, IppiPoint anchor, IppiMorphState* pState);

Supported values for mod:

8u_C1R 32f_C1R
8u_C3R 32f_C3R
8u_C4R 32f_C4R

Parameters

roiWidth

Maximal width of the image ROI in pixels, that can be processed using the allocated structure.

pMask

Pointer to the mask.

maskSize

Size of the mask in pixels.

anchor

Coordinates of the anchor cell.

pState

Pointer to the morphology state structure.

Description

The function ippiMorphologyInit is declared in the ippcv.h file. It operates with ROI (see Regions of Interest in Intel IPP).

This function initializes the morphology state structure pState in the external buffer. Its size should be computed by the function MorphologyGetSize. This structure is used by the functions DilateBorderReplicate and ErodeBorderReplicate that perform morphological operations on the source image pixels corresponding to non-zero values of the structuring element (mask) pMask. The anchor cell anchor is positioned in the arbitrary point in the structuring element and is used for positioning the structuring element.

Warning iconWarning

The structure can be used to process an image with ROI that does not exceed the specified maximum width roiWidth.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if maskSize has a field with a zero or negative value, or if roiWidth is less than 1.

ippStsAnchorErr

Indicates an error if anchor is outside the mask.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.