def make_frame(self, t):
'''
Callback to return an image from from our tub records.
This is called from the VideoClip as it references a time.
We don't use t to reference the frame, but instead increment
a frame counter. This assumes sequential access.
'''
self.iRec = self.iRec + 1
if self.iRec >= self.num_rec - 1:
return None
rec = self.tub.get_record(self.iRec)
image = rec['cam/image_array']
return image # returns a 8-bit RGB array
评论列表
文章目录