PYQT 요약 10.웹캠 움직임감지 (opencv python)


PYQT 요약 10.웹캠 움직임감지 (opencv python)

class MyApp(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.setGeometry(1000, 250, 650, 540) self.setWindowTitle('안녕하세요 PyQt5!') self.cpt = cv2.VideoCapture(0) # VideoCapture(캠번호), 캡쳐 객체생성 self.fps = 24 # 프레임 개수 변수 self.sens = 300 # 영상 변화 감도 변수 _, self.img_o = self.cpt.read() # cpt.read() : 한 장면을 읽어서 self.img_o 에 저장 self.img_o = cv2.cvtColor(self.img_o, cv2.COLOR_RGB2GRAY) # RGB -> GRAY 로 변환 # cv2.cvtColor( 원본영상 , 변환 상수) : 영상변환 cv2.imwrite('img_o.jpg', self....


#PCB #기계 #기구부 #아두이노

원문링크 : PYQT 요약 10.웹캠 움직임감지 (opencv python)