def blkwl(img):
"""Calculate wavelength given an image block"""
f=np.abs(fftshift(fft2(img)))
origin=np.where(f==np.max(f));f[origin]=0;mmax=np.where(f==np.max(f))
wl=2*img.shape[0]/(((origin[0]-mmax[0][0])*2)**2+((origin[1]-mmax[1][0])*2)**2)**0.5
return wl
preprocessing.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录