
OpenCV 3 Computer Vision Application Programming Cookbook
By :

The first recipe of this chapter introduced the idea of linear filtering using kernel matrices. The filters that were used had the effect of blurring an image by removing or attenuating its high-frequency components. In this recipe, we will perform the opposite transformation, that is, amplifying the high-frequency content of an image. As a result, the high-pass filters introduced in this recipe will perform edge detection.
The filter that we will use here is called the Sobel filter. It is said to be a directional filter, because it only affects the vertical or the horizontal image frequencies depending on which kernel of the filter is used. OpenCV has a function that applies the Sobel operator on an image. The horizontal filter is called as follows:
cv::Sobel(image, // input sobelX, // output CV_8U, // image type 1, 0, // kernel specification ...
Change the font size
Change margin width
Change background colour