simulation.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:trackingtermites 作者: dmrib 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号