- 理论
- 代码
理论
能量梯度函数更适合实时评价图像清晰度,该函数定义如下:
https://blog.csdn.net/Real_Myth/article/details/50827940
代码
def energy(img):''':param img:narray 二维灰度图像:return: float 图像约清晰越大'''shape = np.shape(img)out = 0for x in range(0, shape[0]-1):for y in range(0, shape[1]-1):out+=((int(img[x+1,y])-int(img[x,y]))**2)+((int(img[x,y+1]-int(img[x,y])))**2)return out
https://blog.csdn.net/Greepex/article/details/90183018
版权声明
本站仅做备份收录,仅供研究与教学参考之用。
读者将信息用于其他用途的,全部法律及连带责任由读者自行承担,本站不承担任何责任。









评论