recordedCamera.py 文件源码

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

项目:2016-Tegra-OpenCV 作者: HighlandersFRC 项目源码 文件源码
def start(self):
        now = dt.datetime.now()
        if len(self.path) !=0 and self.path[len(self.path)-1] != '/':
            self.path = self.path + '/'    
        output_name = self.path + str(dt.datetime.date(now))+ '-0.avi'
        video_num = 1
        while os.path.isfile(output_name):
            output_name = self.path +str(dt.datetime.date(now)) + '-'+str(video_num)+'.avi'
            video_num = video_num + 1
        fourcc = cv2.cv.CV_FOURCC(*'XVID')
        self.out = cv2.VideoWriter(output_name,fourcc,self.framerate,(self.width,self.height)) 
        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号