iwiFilterCanny
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
- Thekernelvalue is illegal.
- ippStsDataTypeErr
- ThedataTypevalue is illegal.
- ippStsNumChannelsErr
- Thechannelsvalue is illegal.
- ippStsNotEvenStepErr
- ThesrcStepand/ordstStepvalue is not divisible by size of elements.
- ippStsBorderErr
- Thebordervalue is illegal.
- ippStsNoMemErr
- Failed to allocate memory.
- ippStsSizeErr
- Values of thesizefields are illegal.
- ippStsInplaceModeNotSupportedErr
- In-place operation is not supported:pSrcis equal topDst.
- ippStsNullPtrErr
- At least one of the pointers (excepttile) isNULL.