1

I have 8 cameras (UVC) connected to a USB 2.0 hub, and this hub is directly connected to a USB port. I want to capture a single image from a camera with a resolution of ×ばつ3490 in less than 2 seconds.

I would like to capture them all at once, but the USB port's bandwidth prevents me from doing so.

A solution I find feasible is using OpenCV's VideoCapture, initializing/releasing the instance each time I want to take a capture. The instantiation time is not very long, but I think it that could become an issue.

Do you have any ideas on how to perform this operation efficiently?

Would there be any advantage to programming the capture directly with V4L2?

Christoph Rackwitz
16.4k5 gold badges42 silver badges56 bronze badges
asked Jan 26, 2025 at 17:26
4
  • casually, a faster port might help a lot! Commented Jan 26, 2025 at 17:31
  • 1
    usb 2.0? hub bandwidth won't support eight (!) webcams, not in video mode. in still mode, maybe. in my experience, opencv cannot access still photo modes of webcams. use V4L2 directly. Commented Jan 26, 2025 at 20:16
  • @ChristophRackwitz thank you for your comment! I don't prentend to use the cameras at same time. What I want is some kind of still mode, my cameras doesn't have the still feature. Initializing and releasing a VideoCapture instance allow me to have some kind "still image" but seems so unefficient. Can I improve this process with V4L2 ? Commented Jan 26, 2025 at 20:42
  • you might. you can probe the camera device using ffprobe/ffmpeg, get a list of its available modes. if you're lucky, there are still modes available. magic spells from the ffmpeg wiki: trac.ffmpeg.org/wiki/Capture/Webcam#Linux if you can tell that such a mode is available, you can then see how to use it using the V4L2 API. I believe there are v4l2 tools to get more detailed information (v4l2-ctl --list-formats) Commented Jan 26, 2025 at 21:13

1 Answer 1

0

The bandwidth is main limitation. Can do a work around like connecting the cameras into a USB3.2 hub, the host would be fallback to USB2.0 since the devices are USB2.0 type. Let give this a try.

answered May 2, 2025 at 6:45
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.