def smooth_data(data, iterations=4):
"""smooth image stack
:param data: NxMxF ndarray, where F is the number of frames and NxM are the image dimensions
:param iterations: number of times to run the smoothing
:return sv: smoothed data
"""
sv = data
for i in range(iterations):
sv[:, :, i] = cv2.blur(d.T, (3, 3))
return sv
评论列表
文章目录