Laplacian filter is a second derivative operator commonly used in image processing, mainly for edge detection. It highlights regional changes in an image by calculating the second derivative of the image grayscale value. Since it is very sensitive to noise, the image is usually first Gaussian smoothed to reduce the impact of noise. The calculation of the Laplacian operator involves a convolution kernel on the image to obtain the second-order derivative value of each pixel in the image. These values represent the rate of change of the pixel value in the image. This process can effectively detect the edges in the image.
| Input Image | Parameter | Output Image |
|---|---|---|
![]() | kernelSize = 1 borderType = HB_VP_BORDER_CONSTANT normalize = 0 | ![]() |
The main calculation process of Laplacian filter is to convolve the input image using a specific filter kernel. The main formula is as follows:
The is the output image, is the input image. Currently vp only supports OpenCV ksize = 1, [0, 1, 0, 1, -4, 1, 0, 1, 0].
For detailed interface information, please refer to hbVPLaplacianFilter.