How can I access the properties of the camera connected to

Illustration
rihan_dac_12 - 2022-02-07T11:33:45+00:00
Question: How can I access the properties of the camera connected to

How can I access the properties of the camera connected to my NI PCI-1428 frame grabber board when using Image Acquisition Toolbox 3.4 (R2009b) ? I am attempting to acquire images from a camera manufactured by Goodrich-Sensor using the National Instruments PCI-1428 frame grabber board. I am able to acquire the images successfully. The camera has additional properties such as exposure time, gain, timer to name a few. I am able to set these properties using National Instruments Measurement & Automation Explorer (NI-MAX). I would like to be able to set these properties from within MATLAB.   I execute the code below to retrieve the properties of the currently selected source.   vid=videoinput('ni',1,'img0'); src = getselectedsource(vid); get(src) However, the properties returned are for the frame grabber board and not the camera itself.

Expert Answer

Profile picture of John Michell John Michell answered . 2025-11-20

It is not possible to modify the camera specific properties directly from MATLAB. You would have to set them using NI-MAX and then acquire images using Image Acquisition Toolbox.
 
The camera specific properties that are set using NI-MAX are saved to an interface file. This interface is the one referenced in the object constructor below:
 
vid = videoinput('ni',1,'img0');
The third input argument, "img0", is the interface file. The values that are saved by the NI-MAX into the interface will be used by the adaptor to create the VIDEOINPUT object.
 
The NI adaptor for the Image Acquisition Toolbox uses the National Instruments Software Development Kit (SDK). The National Instruments SDK does not present camera specific properties to users of the SDK, and instead relies upon users setting these values from inside NI-MAX and saving them to the interface file.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!