整体思路:
求解的所有文件固定位置灰度值平均值,并作图
from PIL import Image
import os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as ani
os.chdir('D:\python\work\工作平台\diff-gate time')
#建立所有文件名称的list,使用循环异常打开
all_filename=os.listdir()
print(all_filename)
def sov_ever(filename):
imgData = np.fromfile(filename, dtype='uint16')
img=imgData.reshape(3072, 3072, 1)
img_select=[]
a=1844
b=576
for i in range(0,