ChessBoard.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:ChessBot 作者: pakhandi 项目源码 文件源码
def sharpen(self, testImg):
        # Create the identity filter, but with the 1 shifted to the right!
        kernel = np.zeros((9, 9), np.float32)
        kernel[4, 4] = 2.0  # Identity, times two!

        # Create a box filter:
        boxFilter = np.ones((9, 9), np.float32) / 81.0

        # Subtract the two:
        kernel = kernel - boxFilter

        custom = cv2.filter2D(testImg, -1, kernel)

        return testImg

    # driver function to process a single image
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号