![OpenCV 3 Computer Vision with Python Cookbook](https://wfqqreader-1252317822.image.myqcloud.com/cover/102/36700102/b_36700102.jpg)
上QQ阅读APP看书,第一时间看更新
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:
![](https://epubservercos.yuewen.com/34A43F/19470396008899506/epubprivate/OEBPS/Images/5e0a059c-aeaf-404a-9091-7106c78f1cc7.png?sign=1739588802-prR4iizVuVaKjuhkvxnwu2PmD7XIalm0-0-c36bb619664aede397c28f8239dc1cd1)