Ask Your Question

Camera/Capture IDs or Names

asked 2013-01-23 13:43:53 -0600

thezeeman gravatar image

Is there any way to get the id or name of camera being captured??

I want to prevent "cvCreateCameraCapture" being called on a single camera more than once.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-07-23 10:10:15 -0600

pistorinoj gravatar image

Not sure if this is still open, but it depends on which approach to camera input you are using.

I am using videoInput (which I understand is the basis for the VideoCapture OpenCV functions). videoInput does have a getDeviceName function which returns a char listing the camera name. However, I do not think that it is a unique name. For my camera, it just returns "Microsoft LifeCam 3000HD". If there is a way to get a unique device ID, that would be helpful for making sure that you are using the right calibration file with the right camera.

If you are using VideoCapture, I would thins that you could call isOpened and there you will know if it has already been initialized.

edit flag offensive delete link more

Question Tools


Asked: 2013-01-23 13:43:53 -0600

Seen: 6,035 times

Last updated: Jul 23 '13