def filter(get_frame, t):
    timings = np.linspace((t - d), (t + d), n_frames)
    frame_average = np.mean((1.0 * np.array([get_frame(t_) for t_ in timings], dtype='uint16')), axis=0)
    return frame_average.astype('uint8')
def filter(get_frame, t):
    timings = np.linspace((t - d), (t + d), n_frames)
    frame_average = np.mean((1.0 * np.array([get_frame(t_) for t_ in timings], dtype='uint16')), axis=0)
    return frame_average.astype('uint8')