Hi SadiaC
Could you paste your code?
I can confirm that it works for me with this code:
import cv2
# Initialize the VideoCapture object to use the default camera (camera index 1 since 0 is my webcam)
cap = cv2.VideoCapture(1)
# Check if the camera opened successfully
if not cap.isOpened():
print("Error: Could not open camera.")
exit()
# Loop to continuously get frames from the camera
while True:
# Capture frame-by-frame
ret, frame = cap.read()
# Check if the frame was captured successfully
if not ret:
print("Error: Could not read frame.")
break
# Display the resulting frame
cv2.imshow('Video Feed', frame)
# Break the loop if 'q' is pressed
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# Release the VideoCapture object and close display window
cap.release()
cv2.destroyAllWindows()
Thanks,
Jaka