Developer Reference for Intel® Integrated Performance Primitives 2018
Implements the line suppression algorithm.
IppStatus ippiLineSuppression_8u_C1R(const Ipp8u* pSrc, int srcStep, const Ipp8u* pFeature, int featureStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, IppiDifferentialKernel filterType, IppiMaskSize filterMask, Ipp32u avgWndSize, float threshold, IppiBorderType borderType, Ipp8u borderValue, Ipp8u* pBuffer);
ippcv.h
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
ippKernelSobel |
Sobel filter |
ippKernelScharr |
Scharr filter |
ippKernelCentralDiff |
Central differences operator |
Filter Type | Filter Mask |
---|---|
ippKernelSobel | ippMskSize3x3, ippMskSize5x5 |
ippKernelScharr | ippMskSize3x3 |
ippKernelCentralDiff | ippMskSize3x3 |
Linear size of a neighborhood block for averaging.
Line suppression threshold.
Type of border. Possible values are:
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. |
Mixed borders are also supported. They can be obtained by the bitwise operation OR between ippBorderRepl or ippBorderConst and the following flags:
Constant value(s) to assign to pixels of the constant border. This parameter is applicable only to the ippBorderConst border type.
The ippiLineSuppression function implements the line suppression algorithm. This function uses two input images: the original image and feature points image containing the lines (edges) and corners. This function performs the following steps:
Computes I(x, y)x and I(x, y)y gradients for each (x, y) pixel of the image. The function computes gradients using the derivative operator specified by the filterType and filterMask parameters.
Computes products of the gradients at each (x, y) pixel of the image:
Performs averaging of the products of gradients over a rectangular neighborhood block at each pixel of the image. The block size is specified by the avgWndSize value.
Defines 2x2 gradient covariance matrix H(x , y) over a rectangular neighborhood block for each (x, y) pixel of the image.
For each (x, y) pixel of the image checks the condition below. If the condition is true, the considered point is not a feature point.
where
threshold is the line suppression threshold value passed to the function
λ1*λ2 are eigenvalues of the matrix H(x , y). If both eigenvalues have large positive values, the point belongs to a corner. If λ1 is much bigger than λ2, the function clears out the candidate point.
The first and third stages of the function algorithm are filtering operations; they use border processing approach that is specified by the borderType parameter.
Before using this function, compute the size of the external work buffer using the LineSuppressionGetBufferSize function.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when pSrc, pFeature, pDst, or pBufferSize is NULL. |
ippStsSizeErr |
Indicates an error in the following cases:
|
ippStsNotEvenStepErr |
Indicates an error when one of the step values is not divisible by 4 for floating point images. |
ippStsFilterTypeErr |
Indicates an error when filterType has an illegal value. |
ippStsMaskSizeErr |
Indicates an error when filterMask has an illegal value. |
ippStsBorderErr |
Indicates an error when borderType has an illegal value. |
ippStsStepErr |
Indicates an error when srcStep or dstStep has a negative value. |
ippStsInplaceModeNotSupportedErr |
Indicates an error when pFeature and pDst point to the same image. |