can't open my camera on laptop #5823
Labels
legacy:face mesh
Issues related to Face Mesh
os:windows
MediaPipe issues on Windows
platform:python
MediaPipe Python issues
stat:awaiting response
Waiting for user response
type:support
General questions
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
Yes
OS Platform and Distribution
Win11
MediaPipe Tasks SDK version
No response
Task name (e.g. Image classification, Gesture recognition etc.)
face detection
Programming Language and version (e.g. C++, Python, Java)
Python
Describe the actual behavior
show the log info and then exit the process without any error or warning
Describe the expected behaviour
run the code successfully
Standalone code/steps you may have used to try to get what you need
import mediapipe as mp import cv2 as cv mp_draw = mp.solutions.drawing_utils mp_face = mp.solutions.face_mesh faces = mp_face.FaceMesh(min_detection_confidence = 0.7,min_tracking_confidence = 0.7) v = cv.VideoCapture(0) while(v.isOpened()): ret,frame = v.read() if ret is not True: print("read frame error!") break m_frame = cv.cvtColor(frame,cv.COLOR_BGR2RGB) face_res = faces.process(m_frame) if face_res.multi_face_landmarks: for facemarks in face_res.multi_face_landmarks: mp_draw(frame,facemarks,mp_face.FACEMESH_TESSELATION) cv.imshow("camera",frame) cv.waitKey(0) v.release() cv.destroyAllWindows()
Other info / Complete Logs
No response
The text was updated successfully, but these errors were encountered: