0

I have a flask application which is for QR Code scan using opencv(cv2). I am using windows machine, when I dockerize and hit my endpoint I get following error:

[ WARN:0@495.184] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video0): can't open camera by index
[ERROR:0@495.185] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range
[2023-08-28 12:54:55,912] ERROR in app: Exception on /ScanBarcode [GET]

ChapGPT suggest me to add camera access through docker desktop but steps are not accurate.

I am looking for way how I can give access to camera.

  • From the looks of this, it seems that you need to 'expose' your USB camera to the docker container. This might help: https://stackoverflow.com/a/24231872/8602304 – Undesirable Aug 28 '23 at 13:45
  • @Undesirable I've camera at 0 index (web cam) & link you shared is related to ubuntu. – Tanmay Seth Aug 28 '23 at 15:00

0 Answers0