-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecording.py
99 lines (87 loc) · 13.2 KB
/
recording.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import cv2
from threading import Thread, Lock
import os
import numpy as np
class FieldRecorder:
def __init__(self, path):
self.path = path
self.recording = False
self.robot_frame = np.zeros((480,640,3), np.uint8)
def start_recording(self):
self.recording = True
self.cap_bird = cv2.VideoCapture(0)
self.cap_close = cv2.VideoCapture(1)
self.cap_bird.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)
self.cap_bird.set(cv2.CAP_PROP_FRAME_HEIGHT, 720)
self.cap_close.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)
self.cap_close.set(cv2.CAP_PROP_FRAME_HEIGHT, 720)
self.out_bird = cv2.VideoWriter(self.path+'/bird.mp4', cv2.VideoWriter_fourcc('a', 'v', 'c', '1'), 10, (640, 480))
self.out_close = cv2.VideoWriter(self.path+'/close.mp4', cv2.VideoWriter_fourcc('a', 'v', 'c', '1'), 10, (640, 480))
self.out_robot = cv2.VideoWriter(self.path+'/robot.mp4', cv2.VideoWriter_fourcc('a', 'v', 'c', '1'), 10, (640, 480))
self.thread = Thread(target=self.record, args=())
self.write_thread = Thread(target=self.write, args=())
self.lock = Lock()
self.frames_bird = []
self.frames_close = []
self.thread.start()
self.write_thread.start()
def record(self):
while self.recording:
ret, frame_bird = self.cap_bird.read()
# frame_bird = cv2.resize(frame_bird, (1280, 720))
# self.out_bird.write(frame_bird)
ret, frame_close = self.cap_close.read()
# frame_close = cv2.resize(frame_close, (1280, 720))
# self.out_close.write(frame_close)
# self.out_robot.write(self.robot_frame)
self.add_frames(frame_bird, frame_close)
def write(self):
while self.recording or len(self.frames_bird) > 0:
self.lock.acquire()
print(len(self.frames_bird))
if len(self.frames_bird) > 0:
frame_bird = self.frames_bird.pop(0)
frame_close = self.frames_close.pop(0)
self.lock.release()
frame_bird = cv2.resize(frame_bird, (640, 480))
self.out_bird.write(frame_bird)
frame_close = cv2.resize(frame_close, (640, 480))
self.out_close.write(frame_close)
self.out_robot.write(self.robot_frame)
else:
self.lock.release()
# frame_bird = cv2.resize(frame_bird, (1280, 720))
# self.out_bird.write(frame_bird)
# frame_close = cv2.resize(frame_close, (1280, 720))
# self.out_close.write(frame_close)
# self.out_robot.write(self.robot_frame)
def add_frames(self, frame_bird, frame_close):
self.lock.acquire()
self.frames_bird.append(frame_bird)
self.frames_close.append(frame_close)
self.lock.release()
def add_robot_frame(self, image):
self.robot_frame = cv2.resize(decode_base64_image(image), (640, 480))
def stop_recording(self):
self.recording = False
while len(self.frames_bird) > 0:
pass
self.thread.join()
self.thread = None
self.cap_bird.release()
self.cap_close.release()
self.out_bird.release()
self.out_close.release()
def decode_base64_image(image):
import base64
import numpy as np
import cv2
# print(image)
image = base64.b64decode(image)
image = np.frombuffer(image, dtype=np.uint8)
image = cv2.imdecode(image, cv2.IMREAD_COLOR)
return image
if __name__ == "__main__":
image = decode_base64_image("/9j/4AAQSkZJRgABAQAAAQABAAD/4QBbRXhpZgAASUkqAAgAAAACAA4BAgAmAAAAJgAAAJiCAgAHAAAATAAAAAAAAABQb3J0cmFpdCBvZiBhIGJlYXV0aWZ1bCAgZG9nICBvdXRkb29yc2hlbGVuYnL/7QB8UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGAcAlAAB2hlbGVuYnIcAngAJlBvcnRyYWl0IG9mIGEgYmVhdXRpZnVsICBkb2cgIG91dGRvb3JzHAJ0AAdoZWxlbmJyHAJuABhHZXR0eSBJbWFnZXMvaVN0b2NrcGhvdG//4QU6aHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZX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fU97160YxcehZRjLbPoGta0ZLTOmqZL5WAEYIBZT15PlSi21L2jRVkktY1YZDIZB3zngkgdcVmLDVdTguOz3QvEDhezVuflhqMX2gvmOxHDbckgryPqTVG29sRQilSGd/banrBhlvYII5QmCYZWHiSD64H+8UDLoUjIURnMzfGue6M+PUfrQra1eQkbZt8rE5O0Dn0HJxV811qjIFkuWjLjOSoHjx6ilt+x0q0jyNCvYmjjUKobjBm38firYdLSMFb3tHIHcVyQA30/3xoSS9ubazfs7tJXHGdq5x0xzVMN1ciOFptSEMTcHD4OPXzNENDK60mDZttpHTJyVVgf65/NSgZfdrhUabUxgngs56A9f9FStbZqoDmthCoiillQGMsSrckmhe1l93aFpXdAgbDNnr/1UqVUigizvZbeKMwBY3bu7wOcfXx9aMuL2Zw790OqjvYyT9TmpUpH0Ov0Xe8Ss7MHKknnacDj0o5neKGZN5fDbwX5IOKlSsYu0jTLTUAJLqBGdlyXVQrdfMc1UbeB7uQdii7HIXaOg6VKlB/xQIvyYDPPLZ8ROeX28gdDTKwVZUAK7QH3YUkZPrXalZ9DI7bXc51BoxIVAfaMdRRUk9xBPIBcSvhSO+2eKlSkkUj2XW8rXMcksuNxBzQqXDyRvDJtYR42kjnpXalBIzL7dEli3lQGPUil93IUjuI1ACqhA48qlSswLsX2ryThd00irtwQh25/WnYgt209s28fdIXPOSPXmpUp09sSfoXW2xXdFjQKDwAOmKsuSVuNqnaOzzwBUqVggr4baSO9j4snNCTjsSdpZi/UsxyKlSigMYWkKbFG3qOfHNWm1hmQdogITIUeVSpSjlFrBEI5VaNW54LDkfKu1KlM2xaR//9k=")
print(image)
cv2.imwrite("test.jpg", image)