Convolves an image with the kernel.
cv2.filter2D(src, ddepth, kernel[, dst[, anchor[, delta[, borderType]]]]) → dst
cv2.CV_*): Output image depth. Default is -1 to use src1.depth(), and this is used in this app.split() and process them individually.src.dst.cv2.BORDER_*): Pixel extrapolation method. Default is BORDER_DEFAULT. Choose from:
The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.
The function uses the DFT-based algorithm in case of sufficiently large kernels (around \(11 \times 11\) or larger) and the direct algorithm (that uses the engine retrieved by createLinearFilter()) for small kernels.
flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - anchor.y - 1).
copyMakeBorder, otherwise the default value is set to 0.