How can I access gige camera serial number programmatically with IMAQ in Matlab 2015a?

7 ビュー (過去 30 日間)
Shane
Shane 2015 年 9 月 21 日
コメント済み: Shane 2015 年 9 月 23 日
In previous versions of Matlab (for instance 2013b) I was able to read the serial number of my gige camera using the following code:
vid = videoinput('gige', 1, 'Mono8');
src = getselectedsource(vid);
src.DeviceID
For an AVT Prosilica camera this would give me a string like this:
'02-2020C-xxxxx'
Where the last five digits (x's) are the unique device serial number.
However, the "DeviceID" property of the source does not seem to be exposed in Matlab 2015a.
I need this information to know which physical camera I'm connected to when I have multiple cameras connected to the same computer because the "DeviceID" (an integer, usually 1, 2, etc) returned by "imaqhwinfo" seems to be arbitrarily assigned based on the order in which the cameras are turned on.
Is there any other way to access the unique device serial number of the camera from within Matlab? Alternatively, being able to access the IP address of the camera would work as well.

回答 (1 件)

Madhura Suresh
Madhura Suresh 2015 年 9 月 23 日
編集済み: Madhura Suresh 2015 年 9 月 23 日
Hi Shane,
Try the gigecam interface. Using that, you can create a gigecam object using the IP Address or serial number of your camera.
This is not the same as the videoinput interface, and is available with the Image Acquisition toolbox versions R2014b and above.
  1 件のコメント
Shane
Shane 2015 年 9 月 23 日
Hi Madhura,
Thanks for the suggestion. The gigecam object would definitely allow me to connect to a specific camera, but my understanding is that I can only get a single snapshot at a time from a gigecam object (using the "snapshot" function). I'm using a high frame rate (200 FPS) and I need the camera to buffer the frames so that I don't have to rely on Windows/Matlab for precise timing. I typically trigger the camera to acquire a one second movie (200 frames) and then pull the frames into Matlab using "getdata".
What would be perfect is if there was a way to merge the capabilities of "gigecam" and "videoinput" objects so that I could connect to the camera by IP address/serial number and use the videoinput methods. That's exactly the functionality that I need.

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by