Developer Reference for Intel® Integrated Performance Primitives 2019

Inpaint

MODIFIED API. Restores unknown image pixels.

Syntax

IppStatus ippiInpaint_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, IppiInpaintState_8u_C1R* pState, Ipp8u* pBuffer);

IppStatus ippiInpaint_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, IppiInpaintState_8u_C1R* pState, 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 image ROI in pixels.
pState
The pointer to the inpainting structure.
pBuffer
Pointer to the work buffer.

Description

Important

The API of this function has been modified in Intel IPP 9.0 release.

Before using this function, compute the size of the state structure and work buffer using InpaintGetSize and initialize the structure using InpaintInit.

This function operates with ROI (see Regions of Interest in Intel IPP).

This function reconstructs damaged part of the image, or removes a selected object (see Figure “Image Inpainting”). The image part to restore is defined by the mask that is created when the inpainting structure pState is initialized by the InpaintInit function. Different distant transforms can be used, but the Fast Marching method (ippiFastMarching) provides the best results. The order of pixel restoration is defined by the distance through the initialization the inpainting structure pState by the InpaintInit function. Pixels are restored in according to the growing of their distance value. When a pixel is inpainted, it is treated as the known one.

Two algorithms of direct inpainting are supported (controlled by the parameter flags of the InpaintInit function):

The inpainting structure pState can be used to perform restoration of several different images of the same size roiSize.

Image Inpainting

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 when roiSize has a field with zero or negative value, or if differs from the corresponding parameter that is specified when the inpainting structure is initialized by InpaintInit.

ippStsStepErr

Indicates an error condition if srcStep or dstStep is less than roiSize.width * < pixelSize>.

Example

Inpaint.c

See Also