forked from Roorda-Tuten-Labs/AOMcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSetCameraValues.m
32 lines (24 loc) · 927 Bytes
/
SetCameraValues.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function SetCameraValues(Vid,CameraSetting)
src_obj = getselectedsource(Vid);
set(src_obj,'Brightness',CameraSetting.Brightness)
set(src_obj,'Gamma',CameraSetting.Iris)
set(src_obj,'Exposure',CameraSetting.Exposure)
set(src_obj,'Gain',CameraSetting.Gain)
if CameraSetting.ExposureMode==1,
set(src_obj,'ExposureAuto','On')
set(src_obj,'GainAuto','On')
else
set(src_obj,'ExposureAuto','Off')
set(src_obj,'GainAuto','Off')
end
set(src_obj,'Brightness',CameraSetting.Brightness)
set(src_obj,'Gamma',CameraSetting.Iris)
set(src_obj,'Exposure',CameraSetting.Exposure)
set(src_obj,'Gain',CameraSetting.Gain)
Vid.ROIPosition=CameraSetting.ROI;
fprintf('Frame Rate:\t%f\n',src_obj.FrameRate)
fprintf('Exposure:\t%f\n',src_obj.Exposure)
fprintf('Gain:\t\t%f\n',src_obj.Gain)
fprintf('Gamma:\t\t%f\n',src_obj.Gamma)
fprintf('ExposureAuto:\t%s\n',src_obj.ExposureAuto)
fprintf('GainAuto:\t\t%s\n',src_obj.GainAuto)