Intel IPP Integration Wrappers Developer Guide and Reference

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

iwiFilterCanny

Syntax

class IwiFilterCannyParams: public ::IwiFilterCannyParams
{
public:
    IW_BASE_PARAMS_CONSTRUCTORS(IwiFilterCannyParams, iwiFilterCanny_SetDefaultParams)
    IwiFilterCannyParams(IppiDifferentialKernel kernel = ippFilterSobel, IppiMaskSize kernelSize = ippMskSize3x3, IppNormType norm = ippNormL2)
};

IW_DECL_CPP(IppStatus) iwiFilterCanny(
    const IwiImage             &srcImage,                      
    IwiImage                   &dstImage,                      
    Ipp32f                      treshLow    = 50,              
    Ipp32f                      treshHigh   = 150,        
    const IwiFilterCannyParams &auxParams   = IwiFilterCannyParams(),      
    const IwiBorderType        &border      = ippBorderRepl             
);

Parameters

srcImage

Reference to the source image.

dstImage

Reference to the destination image.

treshLow

Lower threshold for edges detection.

treshHigh

Upper threshold for edges detection.

auxParams

Reference to the auxiliary parameters structure.

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.

ippBorderInMem

Border is obtained from the source image pixels in memory.

ippBorderMirror

Border pixels are mirrored from the source image boundary pixels.

Auxiliary Arguments

Argument Default Value Description

kernel

ippFilterSobel

Type of the differential kernel. Supported values: ippFilterSobel, ippFilterScharr.

kernelSize ippMskSize3x3 Size of the filter kernel. Supported values for ippFilterSobel: ippMskSize3x3, ippMskSize5x5; for ippFilterScharr: ippMskSize3x3.
norm ippNormL2 Normalization mode. Supported values: ippNormL1 and ippNormL2.

Description

This function applies the Canny edge detector to the source image. For more information about the Canny edge detector algorithm, refer to the iwiFilterCanny function description in C Reference.

Return Values

ippStsNoErr

No errors.

Exception Values

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 tile) is NULL.