1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| #!/usr/bin/env python
| # -*- coding: utf-8 -*-
| # @Time : 2019/10/30 15:27
| # @Author : Scheaven
| # @File : utils.py
| # @description:
| import cv2
|
| class video_open:
| def __init__(self,args):
| #self.readtype=read_type
| if args.in_type == "camera":
| self.readtype = args.c_in
| else:
| self.readtype= args.v_in
|
| def generate_video(self):
| video_capture = cv2.VideoCapture(self.readtype)
| return video_capture
|
|