- OpenCV 3 Computer Vision with Python Cookbook
- Alexey Spizhevoy Aleksandr Rybnikov
- 56字
- 2021-08-27 19:47:46
How it works...
OpenCV's cv2.filter2d function takes an input image, output result datatype, OpenCV ID (-1, if you want to keep the input image datatype), and filter kernel; then, image is filtered linearly.
In this recipe, we constructed a sharpening kernel that should emphasize high frequencies in the source image. The following output is expected: