fix python code that can not run alone
This commit is contained in:
parent
a92cff7a60
commit
fc2f7b3b8e
|
@ -77,7 +77,9 @@ Supported configuration options:
|
|||
```python
|
||||
import cv2
|
||||
import mediapipe as mp
|
||||
mp_face_detction = mp.solutions.face_detection
|
||||
mp_face_detection = mp.solutions.face_detection
|
||||
mp_drawing = mp.solutions.drawing_utils
|
||||
file_list = []
|
||||
|
||||
# For static images:
|
||||
with mp_face_detection.FaceDetection(
|
||||
|
@ -124,6 +126,7 @@ with mp_face_detection.FaceDetection(
|
|||
for detection in results.detections:
|
||||
mp_drawing.draw_detection(image, detection)
|
||||
cv2.imshow('MediaPipe Face Detection', image)
|
||||
#Press ESC to quit.
|
||||
if cv2.waitKey(5) & 0xFF == 27:
|
||||
break
|
||||
cap.release()
|
||||
|
|
Loading…
Reference in New Issue
Block a user