c++ - Get device ID from current capture -


i'm using opencv video frames. how camera capture initialised:

videocapture capture; capture.open(0);  //read camera #0 

if wanted switch different camera, i'd this:

capture.release();  //release stream capture.open(1);    //open different stream 

imagine had few cameras connected computer , wanted loop through them using 2 buttons previous camera , next camera. without saving current camera id variable, need actual value videocapture object.
there way how find out id of used device?

pseudocode:

int current = capture.deviceid; capture.release(); capture.open(current++); 

so there way how find out id of used device?

there's no way because class videocapture doesn't contain such variable or method. contains protected pointer cvcapture (take @ highgui.h) try play don't have access field.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -