Intel IPP Integration Wrappers Developer Guide and Reference

ID 751823
Date 1/18/2023
Public
Document Table of Contents

iwiFilterScharr

Syntax

typedef struct _IwiFilterScharrParams
{
    int reserved;
} IwiFilterScharrParams;
static IW_INLINE void iwiFilterScharr_SetDefaultParams(
    IwiFilterScharrParams *pParams
);
IW_DECL(IppStatus) iwiFilterScharr(
    const IwiImage              *pSrcImage,
    IwiImage                    *pDstImage, 
    IwiDerivativeType            opType,    
    IppiMaskSize                 kernelSize,
    const IwiFilterScharrParams *pAuxParams,
    IwiBorderType                border,     
    const Ipp64f                *pBorderVal, 
    const IwiTile               *pTile        
);

Parameters

pSrcImage

Pointer to the source image.

pDstImage

Pointer to the destination image.

opType

Type of the Sobel operator from IwFilterSobelType.

kernelSize

Size of the filter kernel. Supported values: ippMskSize3x3, ippMskSize5x5

pAuxParams

Pointer to the auxiliary parameters structure. If NULL, default parameters are used.

border

Extrapolation algorithm for out of image pixels processing. Supported values:

ippBorderConst

Values of all border pixels are set to a constant.

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderMirror

Border pixels are mirrored from the source image boundary pixels.

ippBorderInMem

Border is obtained from the source image pixels in memory.

pBorderVal

Pointer to an array of values to assign to pixels of the constant border, one element of the array for each channel of the image. This parameter is applicable only to the ippBorderConst border type and can be NULL for other border types.

pTile

Pointer to the IwiTile structure for tiling. If NULL, the whole image is processed.

Auxiliary Arguments

Argument Default Value Description

reserved

0

Reserved value.

Description

This function applies a Scharr filter of the specified type and kernel size to the source image. The values of border pixels are assigned in accordance with the border and pBorderValue parameters. The kernel of the filter is a matrix of 3x3 or 5x5 size depending on the kernelSize value.

This function supports the following features:

Feature Support
Internal threading No
Manual tiling Yes
IwiTile simple tiling Yes
IwiTile pipeline tiling Yes

Return Values

ippStsNoErr

No errors.

ippStsNotSupportedModeErr

Specified combination of parameters' values is not supported.

ippStsMaskSizeErr

The kernel value is illegal.

ippStsDataTypeErr

The dataType value is illegal.

ippStsNumChannelsErr

The channels value is illegal.

ippStsNotEvenStepErr

The srcStep and/or dstStep value is not divisible by size of elements.

ippStsBorderErr

The border value is illegal.

ippStsNoMemErr

Failed to allocate memory.

ippStsSizeErr

Values of the size fields are illegal.

ippStsInplaceModeNotSupportedErr

In-place operation is not supported: pSrc is equal to pDst.

ippStsNullPtrErr

At least one of the pointers (except pTile) is NULL.