Ask Your Question

Revision history [back]

[Python OpenCV] Camera selection, same model

Hello,

I'm Pedro, currently doing my engineering bachellor thesis at university. I'm developing a project where I need to take photos from 6 cameras, not at the same time, and each of them is located in a certain point of a test bench. I've been researching several weeks, trying everything I've managed to find, but I've not been able to find a solution for the following problem: I need to tell the program who each camera is, entirely from software (telling the program manually who is each camera every time I run it is not an option, but I could tell him 1 time as a set of constants, but that should be 100% robust to computer/RaspberryPi rebooting). I'm taking the photos with OpenCV python's class VideoCapture, but it uses these camera indexes I've not been able to manage to control. Any solution is ok both in Windows or Raspbian. Does anyone know how could I make those indexes relate to a certain camera, forcing a relation between, for example, camera "top" and index 5? Any other approach is also welcome, of course!

Thank you very much guys, I'm pretty much desperate right now, I've trued so many things and I'm running out of time for the project