MorphAdvInitAlloc

Allocates and initializes morphology state structure for advanced morphology operations.

Syntax

IppStatus ippiMorphAdvInitAlloc_<mod>(IppiMorphAdvState** ppState, IppiSize roiSize, const Ipp8u* pMask, IppiSize maskSize, IppiPoint anchor);

Supported values for mod:

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

Parameters

ppState

Pointer to the pointer to the advanced morphology state structure.

roiSize

Maximal size 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.

Description

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

This function allocates memory, initializes the advanced morphology state structure and returns the pointer ppState to it. It is used by the functions MorphOpenBorder, MorphCloseBorder, MorphTophatBorder, MorphBlackhatBorder, and MorphGradientBorder that perform advanced morphological operations (opening, closing, top-hat, black-hat, and gradient) on the source image pixels corresponding to non-zero values of the structuring element 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 function can process only images with ROI that does not exceed the specified by the initialization functions 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 or if roiSize has a field with a zero or negative value.

ippStsAnchorErr

Indicates an error if anchor is outside the mask.

Submit feedback on this help topic

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