image = | highPass2dImg (inImg,inHalfKnlSize) |
high pass filter on 2d image
High-pass filters keep high frequencies of the input image and reduce low frequencies. They are usually used to make the image appear sharper. This current implementation of high-pass filter is equivalent to a 2d convolution, using a square kernel of given half size ( ), whose all elements equal to -1, except the central element, whose value equals to
.
A mirror policy is used to apply filter to borders. Input and output images must have same size (see Border policy for more details).
Here is an example of a high-pass filter applied to an 8-bits grey levels input image (with ) :