InpaintInitAlloc

Allocates memory and initializes a structure for image inpainting.

Syntax

IppStatus ippiInpaintInitAlloc_8u_C1R(IppiInpaintState_8u_C1R** ppState, const Ipp32f* pDist, int distStep, const Ipp8u* pMask, int maskStep, IppiSize roiSize, Ipp32f radius, IppiInpaintFlag flags);

IppStatus ippiInpaintInitAlloc_8u_C3R(IppiInpaintState_8u_C3R** ppState, const Ipp32f* pDist, int distStep, const Ipp8u* pMask, int maskStep, IppiSize roiSize, Ipp32f radius, IppiInpaintFlag flags);

Parameters

ppState
Double pointer to the state structure for the image inpaiting.
pDist
Pointer to the ROI of the image of distances.
distStep
Distance in bytes between starts of consecutive lines in the image of distances.
pMsk
Pointer to the mask image ROI.
mskStep
Distance in bytes between starts of consecutive lines in the mask image.
roiSize
Size of the image ROI in pixels.
radius
Radius of the neghborhood used for inpainting.
flags
Specifies algorithm for image inpainting; following values are possible:

IPP_INPAINT_TELEA

Telea algorithm;

IPP_INPAINT_NS

Navier-Stokes equation.

Description

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

This function allocates memory and initializes the structure ppState for direct methods of image inprinting. This structure is used by the function ippiInpaint and can be applied to process images with ROI of the same size roiSize. Zero pixels of the mask image pMsk correspond to known image pixels, non-zero pixels - correspond to unknown image pixels that should be restored. The distance image pDist specifies the order of pixel inpainting. Values of unknown pixels are restored in ascending order in dependence on their distances. The parameter radius specifies the radius of the circular neighborhood that affects the restoration of the central pixel. The parameter specifies the methods of direct inprinting. Two methods are supported: Telea algorithm [ Telea04], and Navier-Stokes equation [ Bert01]

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 distStep or mskStep is less than roiSize.width * < pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if one of the step values is not divisible by 4 for floating-point images.

ippStsBadArgErr

Indicates an error condition if radius is less than 1, or flags has an illegal value.

ippStsMemAllocErr

Memory allocation error.

Submit feedback on this help topic

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