Kevin Dedhia
Kevin Dedhia

Reputation: 1

Arducam can't open camera by index (V4L2)

I have a raspberry Pi 4 and I am using a arducam camera along with open Cv it was working fine until now and suddenly is shows error "code

[WARN:0] global/tmp/pip-wheel-w_lllcn3/opencv-python_622962b8a47a42ed9a5e55c557dab@ed/opencv/modules/video10/src/cap v41.cpp (893) open VIDEOIO (V4L2:/dev/video0): can't open camera by index"

Everything is same i haven't changed the code, even the example code stoped working.

I tried

Import cv2

cap = cv2.VideoCapture(-1)

while True:

  success, frame = cap.read()

  cv2.imshow('win', frame)

  cv2.waitKey(1)

I also tried:

cv2.VideoCapture(0,cv2.CAP_DSHOW)
cv2.VideoCapture(index, cv2.CAP_V4L)

But nothing works

Error message:

[ WARN:0] global/tmp/pip-wheel-w_lllcn3/opencv-python_622962b8a47a42ed9a5e55c557dab@ed/opencv/modules/videoio/src/cap v41.cpp (893) open VIDEOID (V4L2:/dev/video0): can't open camera by index

Upvotes: 0

Views: 109

Answers (0)

Related Questions