Inpaint

Restores unknown image pixels.

Syntax

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

IppStatus ippiInpaint_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, IppiInpaintState_8u_C3R* pState);

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.

Description

The function ippiInpaint is declared in the ippcv.h It 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 Inprinting”). The image part to restore is defined by the mask that is created when the inpainting structure pState is initialized by the function ippiInpaintInitAlloc. 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 function ippiInpaintInitAlloc. 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 function ippiInpaintInitAlloc):

The inpainting structure pState must be initialized by the function ippiInpaintInitAlloc, and may be used to perform restoration of several different images of the same size roiSize.

Image Inprinting

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, or if differs from the corresponding parameter that is specified when the inpainting structure is initialized by the ippiInpaintInitAlloc .

ippStsStepErr

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

Submit feedback on this help topic

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