dcam matlab,matlab – 如何更改相机参数(自动曝光,快门速度,增益)?
我正在使用Matlab从2点灰度相机(Flea2)中捕捉图像,我想更改相机的一些参数,如自动曝光,增益和快门速度.到目前为止,我使用了这些命令:
%Creating the two video input of the two cameras
cam1 = videoinput('dcam',1,'Y8_640x480');
cam2 = videoinput('dcam',2,'Y8_640x480');
%get devices properties
src1 = getselectedsource(cam1);
src2 = getselectedsource(cam2);
%define and set parameters to be changed
properties = {'AutoExposureAbsolute','AutoExposureControl', 'AutoExposureMode', 'GainAbsolute', 'GainControl', 'GainMode','ShutterAbsolute','ShutterControl', 'ShutterMode'};
values = {0,'absolute', 'manual', 0,'absolute', 'manual', 0, 'manual', 5e-06, 'absolute', 'manual'};
set(src1, properties, values)
set(src2, properties, values)
所以,如果我显示src1和src2变量,上面的属性已被修改,但是当我预览相机时没有任何改变.
虽然使用相同的语法来改变帧速率,但我很成功.
dcam matlab,matlab – 如何更改相机参数(自动曝光,快门速度,增益)?
我正在使用Matlab从2点灰度相机(Flea2)中捕捉图像,我想更改相机的一些参数,如自动曝光,增益和快门速度.到目前为止,我使用了这些命令:
%Creating the two video input of the two cameras
cam1 = videoinput('dcam',1,'Y8_640x480');
cam2 = videoinput('dcam',2,'Y8_640x480');
%get devices properties
src1 = getselectedsource(cam1);
src2 = getselectedsource(cam2);
%define and set parameters to be changed
properties = {'AutoExposureAbsolute','AutoExposureControl', 'AutoExposureMode', 'GainAbsolute', 'GainControl', 'GainMode','ShutterAbsolute','ShutterControl', 'ShutterMode'};
values = {0,'absolute', 'manual', 0,'absolute', 'manual', 0, 'manual', 5e-06, 'absolute', 'manual'};
set(src1, properties, values)
set(src2, properties, values)
所以,如果我显示src1和src2变量,上面的属性已被修改,但是当我预览相机时没有任何改变.
虽然使用相同的语法来改变帧速率,但我很成功.