I am using an E-Video DC-350 webcam with the Image Acquisition Toolbox through the WINVIDEO adaptor. After creating a VIDEOINPUT object 'vid', I explore the video source object properties as follows:
src = getselectedsource(vid);get(src) General Settings: Parent = [1x1 videoinput] Selected = on SourceName = input1 Tag = Type = videosource UserData = [] Device Specific Properties: BacklightCompensation = on Brightness = 255 BrightnessMode = auto Contrast = 127 Exposure = 511 ExposureMode = auto Focus = 58 FrameRate = 15.1500 Gamma = 0 Iris = 4 Saturation = 108 Sharpness = 127 WhiteBalance = 100 WhiteBalanceMode = auto
I get further information about the BacklightCompensation property as follows.
propinfo(src, 'BacklightCompensation') ans = Type: 'string' Constraint: 'enum' ConstraintValue: {'on' 'off'} DefaultValue: 'on' ReadOnly: 'whileRunning' DeviceSpecific: 1
Therefore, within MATLAB this property can only be 'on' or 'off'. However, in the camera vendor's application or other applications (eg. Adobe Photoshop) that can import from a Twain driver this same property can be set to a numeric value. Unfortunately, when I set the property to either the 'on' or 'off' setting in MATLAB, this results in the property being set to zero (visible in the vendor's application) and the camera exposure is so low that it is essentially unusable except in very bright environments. It appears that when MATLAB creates the VIDEOINPUT object for this device, it does not interpret the allowed values for the BacklightCompensation property correctly. I need to be able to set numeric values for this property.
Best Answer