def simulate(self):
"""Displays termite trail recorded points at a black arena.
Args:
None.
Returns:
None.
"""
self.video_source = video.VideoPlayer(self.params['original_video_path'], self.params['output_path'],
self.params['arena_size'], [], True, 'MOG')
simulation_length = min(len(x.trail) for x in self.termites)
self.current_step = 0
while self.current_step < simulation_length:
self.background = np.zeros((self.params['arena_size'][1], self.params['arena_size'][0],
3), np.uint8)
self.draw()
self.show()
self.current_step += 1
self.video_source.next_frame()
cv2.destroyAllWindows()
评论列表
文章目录