/
sat1988
/
AutonomousFlight
Обзор
Документация
Войти
/
sat1988
/
AutonomousFlight
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
4-Camera/3-SaveVideo.py
14 строк
515 B
Oleg Chorakaev
Добавление примером работы с камерой
30 июл 2025, 14:38
30 июл 2025, 14:38
d78f42d
Код
Авторство
О чём код?
import cv2 from pioneer_sdk import Camera # Connect to the drone camera camera = Camera() fourcc = cv2.VideoWriter_fourcc(*'XVID') out = cv2.VideoWriter('output.avi', fourcc, 20.0, (640, 480)) while True: frame = camera.get_cv_frame() # Get frame (in this case already decoded) cv2.imshow("video", frame) # Show an image on the screen out.write(frame) if cv2.waitKey(1) == 27: # Exit if the ESC key is pressed break out.release() cv2.destroyAllWindows() # Close all opened openCV windows