The Laplacian is another high-pass linear filter that is based on the computation of the image derivatives. As will be explained, it computes second-order derivatives to measure the curvature of the image function.
Computing the Laplacian of an image
How to do it...
The OpenCV function, cv::Laplacian, computes the Laplacian of an image. It is very similar to the cv::Sobel function. In fact, it uses the same basic function, cv::getDerivKernels, in order to obtain its kernel matrix. The only difference is that there are no derivative order parameters since these ones are, by definition, second-order derivatives. The following steps will help us in computing as follows:
- For this operator, we will create a simple class that will...