You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would appreciate if anyone could provide assistance regarding this error message. Mediapipe has been installed and the camera being used with the Raspberry Pi 4 is functioning, which was verified by using the following command to test it.
libcamera-still -o test.jpg
The issue however occurs when attempting to run the recognize.py script, which gives me the error:
"ERROR: Unable to read from webcam. Please verify your webcam settings."
I'm unsure if the issue is coming from the use of cv2 and the introduction of the new python library PiCamera2 or something else entirely. The following code seems to be where the error is occurring, but I just don't how to resolve it. Again, I'd greatly appreciated the help if possible.
Continuously capture images from the camera and run inference
while cap.isOpened():
success, image = cap.read()
if not success:
sys.exit(
'ERROR: Unable to read from webcam. Please verify your webcam settings.'
)
Lines(100-106)
where cap seems to instantiated below as cv2:
Start capturing video input from the camera
cap = cv2.VideoCapture(camera_id)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, width)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
Lines(56-59)
The text was updated successfully, but these errors were encountered:
Apparently it's an issue with a newer version of the camera. Someone sent
me a workaround they used, I just haven't had time to look into it with
being on leave and IO. I'll dig up their code when I'm back at work on
Tuesday to post.
On Sat, May 4, 2024, 1:02 PM EGCVants ***@***.***> wrote:
I would appreciate if anyone could provide assistance regarding this error
message. Mediapipe has been installed and the camera being used with the
Raspberry Pi 4 is functioning, which was verified by using the following
command to test it.
libcamera-still -o test.jpg
I'm unsure if the issue is coming from the use of cv2 and the introduction
of the new python library PiCamera2. The following code seems to be where
the error is occurring, but I just don't how to resolve it. Again, I'd
greatly appreciated the help if possible.
Continuously capture images from the camera and run inference
while cap.isOpened():
success, image = cap.read()
if not success:
sys.exit(
'ERROR: Unable to read from webcam. Please verify your webcam settings.'
)
Lines(100-106)
where cap seems to instantiated below as cv2:
Start capturing video input from the camera
cap = cv2.VideoCapture(camera_id)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, width)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
Lines(56-59)
—
Reply to this email directly, view it on GitHub
<#383>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR2C33YXIJQVJTIDFX2WPDZAUPCXAVCNFSM6AAAAABHHADSESVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3TSMJTG42DMNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
I would appreciate if anyone could provide assistance regarding this error message. Mediapipe has been installed and the camera being used with the Raspberry Pi 4 is functioning, which was verified by using the following command to test it.
libcamera-still -o test.jpg
The issue however occurs when attempting to run the recognize.py script, which gives me the error:
"ERROR: Unable to read from webcam. Please verify your webcam settings."
I'm unsure if the issue is coming from the use of cv2 and the introduction of the new python library PiCamera2 or something else entirely. The following code seems to be where the error is occurring, but I just don't how to resolve it. Again, I'd greatly appreciated the help if possible.
Continuously capture images from the camera and run inference
while cap.isOpened():
success, image = cap.read()
if not success:
sys.exit(
'ERROR: Unable to read from webcam. Please verify your webcam settings.'
)
Lines(100-106)
where cap seems to instantiated below as cv2:
Start capturing video input from the camera
cap = cv2.VideoCapture(camera_id)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, width)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
Lines(56-59)
The text was updated successfully, but these errors were encountered: