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 -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -