Summary
In this chapter, we covered the concept of spatial filtering and showed different applications for the convolution kernel from noise reduction to edge detection. We've seen how to use OpenCV to smooth images using the averaging, Gaussian, and median filters. We also used the OpenCV implementation for Sobel and Canny edge detectors. In addition to image smoothing and edge detection, we also covered a well-known shape analysis technique called the Hough transform to fit lines and circles to edge pixels.
In the next chapter, we will continue to develop this application in order to use the concepts to detect edges and fit lines to find the appropriate transformation and do some perspective correction so that the documents that we capture using the device's camera will look as if they were scanned.