I know this type of question (or similar) has already been asked several times on this forum and please apologize if I ask it ones more, but I read/worked many hours on this problem and could still make zero progress:
I am working with a Jetson AGX Xavier device (Jetpack 4.6) and have just prepared the L4T-ML docker container (NVIDIA NGC) for working with GPU(Cuda) accelerated OpenCV for Computer Vision applications. The OpenCV works well in the container it can communicate with Cuda and I can run several basic image/video processing test in “OpenCV-GPU mode”, but there is a big problem:
OpenCV can’t sense my webcam from the L4T-ML container
If I use OpenCV installed by simple pip install from the SSD/SD card it can perfectly use the webcam but it can only run in cpu mode in this case. I use this code to test my webcam in CPU mode and it works fine:
vid = cv2.VideoCapture(0)
ret, frame = vid.read() cv2.imshow('frame', frame) if cv2.waitKey(1) & 0xFF == ord('q'): break
I am not even sure that this code is the right test for GPU mode OpenCV from the L4T-ML container but I tried this.
I have tried many modifications that I read in other topics about similar camera poblems, but with zero success, I know the problem can be in many points.
Can you tell me how I could use my webcam from the L4T-ML container?
I really appreciate any opinion.