|
|
|
@ -59,7 +59,9 @@ class FaceDetect(QThread):
|
|
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
|
face_cascade = cv2.CascadeClassifier('./static/cascade.xml')
|
|
|
|
|
capture = cv2.VideoCapture(0)
|
|
|
|
|
capture = cv2.VideoCapture(0, cv2.CAP_DSHOW)
|
|
|
|
|
codec = cv2.VideoWriter_fourcc("M", "J", "P", "G")
|
|
|
|
|
capture.set(cv2.CAP_PROP_FOURCC, codec)
|
|
|
|
|
while self.working:
|
|
|
|
|
ret, frame_color = capture.read()
|
|
|
|
|
(height, width, channels) = frame_color.shape
|
|
|
|
|