Developer Reference for Intel® Integrated Performance Primitives 2019
Performs two-dimensional convolution of two images.
Case 1: Operating on integer data
IppStatus ippiConv_<mod>(const Ipp<datatype>* pSrc1, int src1Step, IppiSize src1Size, const Ipp<datatype>* pSrc2, int src2Step, IppiSize src2Size, Ipp<datatype>* pDst, int dstStep, int divisor, IppEnum algType, Ipp8u* pBuffer);
Supported values for mod
8u_C1R | 16s_C1R |
8u_C3R | 16s_C3R |
8u_C4R | 16s_C4R |
Case 2: Operating on floating-point data
IppStatus ippiConv_<mod>(const Ipp32f* pSrc1, int src1Step, IppiSize src1Size, const Ipp32f* pSrc2, int src2Step, IppiSize src2Size, Ipp32f* pDst, int dstStep, IppEnum algType, Ipp8u* pBuffer);
Supported values for mod
32f_C1R |
32f_C3R |
32f_C4R |
ippi.h
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
pSrc1, pSrc2 |
Pointers to the source images ROI. |
src1Step, src2Step |
Distance, in bytes, between the starting points of consecutive lines in the source images. |
src1Size, src2Size |
Size in pixels of the source images. |
pDst |
Pointer to the destination image ROI. |
dstStep |
Distance, in bytes, between the starting points of consecutive lines in the destination image. |
divisor |
The integer value by which the computed result is divided (for operations on integer data only). |
algType |
Bit-field mask for the algorithm type definition. Possible values are the results of composition of the IppAlgType and IppiROIShape values. |
pBuffer |
Pointer to the buffer for internal calculations. |
Before using this function, you need to compute the size of the work buffer using the ippiConvGetBufferSize function.
The ippiConv function operates with ROI. The type of convolution that function performs is defined by the value of the algType parameter:
where
Mh = Mf + Mg - 1
where
Mf is the number of rows in the first source image matrix f
Mg is the number of rows in the second source image matrix g
Nh = Nf + Ng - 1
where
Nf is the number of columns in the first source image matrix f
Ng is the number of columns in the second source image matrix g
0 ≤i < Mh, 0 ≤i < Nh
where
Mh = | Mf - Mg| + 1
where
Mf is the number of rows in the first source image matrix f
Mg is the number of rows in the second source image matrix g
Nh = |Nf - Ng| + 1
where
Nf is the number of columns in the first source image matrix f
Ng is the number of columns in the second source image matrix g
This case assumes that Mf≥Mg and Nf≥Ng. In case when Mf < Mg and Nf < Ng, the subscript index g in this equation must be replaced with the index f. For any other combination of source image sizes, the function performs no operation.
The above formula provides the same result as in the case with the ippiROIFull flag, but produces only the part of the convolution image that is computed without zero-padded values.
Function flavors that accept input data of the Ipp32f type use the same summation formula, but without scaling of the result (divisor = 1 is assumed).
The following examples illustrate the function operation. For the source images f, g of size 3 x 5 represented as
with g = f:
h = [11]
ippStsNoErr |
Indicates no error. Any other value indicates an error. |
ippStsNullPtrErr |
Indicates an error when any of the specified pointers is NULL. |
ippStsSizeErr |
Indicates an error when src1Size or src2Size has a zero or negative value. |
ippStsStepErr |
Indicates an error when src1Step, src2Step, or dstStep has a zero or negative value. |
ippStsDivisorErr |
Indicates an error when divisor has a zero value. |
ippStsAlgTypeErr |
Indicates an error when:
|