Specifications
Image Filtering
6-5
6
CreateConvKernel, CreateConvKernelChar,
CreateConvKernelFP
Creates a convolution
kernel.
IplConvKernel* iplCreateConvKernel(int
nCols
, int
nRows
,
int
anchorX
, int
anchorY
, int*
values
, int
nShiftR
);
IplConvKernel* iplCreateConvKernelChar(int
nCols
, int
nRows
, int
anchorX
, int
anchorY
, char*
values
, int
nShiftR
);
IplConvKernelFP* iplCreateConvKernelFP(int
nCols
, int
nRows
, int
anchorX
, int
anchorY
, float *
values
);
nCols
The number of columns in the convolution kernel.
nRows
The number of rows in the convolution kernel.
anchorX, anchorY
The [x, y] coordinates of the anchor cell in the
kernel. In this coordinate system, the top left
corner would be [0, 0] and the bottom right
corner would be [
nCols
-1,
nRows
-1]. For a 3 by
3 kernel, the coordinates of the geometric center
would be [1, 1]. This specification allows the
kernel to be skewed with respect to its geometric
center.
values
A pointer to an array of values to be used for the
kernel matrix. The values are read in row-major
form starting with the top left corner. There
should be exactly
nRows
*
nCols
entries in this
array. For example, the array [1, 2, 3, 4, 5, 6, 7, 8,
9] would represent the following kernel matrix:
123
456
789