PyQt와 OpenCV로 카메라 스트리밍 토글하기
그냥 반복에 반복하며 쓰고 있는 코드라서 정리할 겸 작성해봄. 목표 및 설계 연결된 카메라를 이용한 스트리밍을 토글할 수 있는 GUI 카메라 쓰레드는 파일을 따로 생성 cam_id로 특정 카메라 불러오기 (보통 0 또는 1) width, height, fps 설정할 수 있도록.. 1. 설치 pip install pyqt5 pip install opencv-python 2. 코딩 # main.py import sys from camera import CameraThread from PyQt5.QtGui import QPixmap from PyQt5.QtWidgets import ( QApplication, QMainWindow, QWidget, QVBoxLayout, QLabel, QPushButton, ..
2023.08.02