Gaussian pyramid
xthepoet opened this issue · 1 comments
xthepoet commented
When I was reviewing the code for the gaussian_video function:
def gaussian_video(video, shrink_multiple):
"""Create a gaussian representation of a video"""
vid_data = None
for x in range(0, video.shape[0]):
frame = video[x]
gauss_copy = numpy.ndarray(shape=frame.shape, dtype="float")
gauss_copy[:] = frame
for i in range(shrink_multiple):
gauss_copy = cv2.pyrDown(gauss_copy)
if x == 0:
vid_data = numpy.zeros((video.shape[0], gauss_copy.shape[0], gauss_copy.shape[1], 3))
vid_data[x] = gauss_copy
return vid_data
It seems like it's just downsampling and overwriting gauss_copy 4 times (lines 106-107). I thought the algorithm saved all levels of the pyramid instead of just the lowest one?
brycedrennan commented
This is by design. I was similarly confused given the name "pyramid" but this appears to be what MIT did in their matlab code as well. I haven't looked at the laplacian pyramid yet so maybe that works differently.