filters3d_plgs.py 文件源码

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

项目:imagepy 作者: Image-Py 项目源码 文件源码
def run(self, ips, imgs, para = None):
        gradient = np.zeros(imgs.shape, dtype=np.float32)
        gradient += ndimg.sobel(imgs, axis=0, output=np.float32)**2
        gradient += ndimg.sobel(imgs, axis=1, output=np.float32)**2
        gradient += ndimg.sobel(imgs, axis=2, output=np.float32)**2
        gradient **= 0.5
        gradient /= 8
        if imgs.dtype == np.uint8: np.clip(gradient, 0, 255, gradient)
        imgs[:] = gradient
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号