Пример #1
0
        public static Dictionary <string, CameraProperty> Read(VideoCaptureDevice device)
        {
            Dictionary <string, CameraProperty> properties = new Dictionary <string, CameraProperty>();

            if (device.Logitech_SupportExposureProperty())
            {
                properties.Add("exposure_logitech", ReadLogitechProperty(device));
            }
            else
            {
                properties.Add("exposure", ReadProperty(device, CameraControlProperty.Exposure));
            }

            properties.Add("gain", ReadProperty(device, VideoProcAmpProperty.Gain));
            properties.Add("focus", ReadProperty(device, CameraControlProperty.Focus));

            return(properties);
        }
Пример #2
0
        public static Dictionary <string, CameraProperty> Read(VideoCaptureDevice device)
        {
            Dictionary <string, CameraProperty> properties = new Dictionary <string, CameraProperty>();

            if (device.Logitech_SupportExposureProperty())
            {
                CameraProperty exposureProp = ReadLogitechProperty(device);
                if (exposureProp.Supported)
                {
                    properties.Add("exposure_logitech", exposureProp);
                }
            }
            else
            {
                CameraProperty exposureProp = ReadProperty(device, CameraControlProperty.Exposure);
                if (exposureProp.Supported)
                {
                    properties.Add("exposure", exposureProp);
                }
            }

            CameraProperty gainProp = ReadProperty(device, VideoProcAmpProperty.Gain);

            if (gainProp.Supported)
            {
                properties.Add("gain", gainProp);
            }

            CameraProperty focusProp = ReadProperty(device, CameraControlProperty.Focus);

            if (focusProp.Supported)
            {
                properties.Add("focus", focusProp);
            }

            return(properties);
        }