public bool AutoIris { get; set; } Public Property AutoIris As Boolean
true if the AutoIris setting is enabled; false, otherwise.
Gets and sets the auto setting for the CameraControlProperty.Iris property. To get the range and default value of this camera property, use the CameraControl.IrisInfo property. For more information, refer to the Microsoft documentation for the IAMCameraControl.Get and IAMCameraControl.Set and methods. Assigning a value to this property can raise an error exception.
For more information, refer to the Error Codes.
using Leadtools;using Leadtools.Multimedia;using LeadtoolsMultimediaExamples.Fixtures;public bool _result = false;public CaptureCtrlForm _form = new CaptureCtrlForm();public void CameraControlExample(){// reference the capture controlCaptureCtrl capturectrl = _form.CaptureCtrl;try{// try to find a USB video device. use your device's name hereif (capturectrl.VideoDevices["USB"] == null)throw new Exception("No USB video device available");capturectrl.VideoDevices["USB"].Selected = true;// reference the camera controlCameraControl camera = capturectrl.CameraControl;if (camera != null){// try to set some camera auto propertiescamera.AutoExposure = true;camera.AutoFocus = true;camera.AutoIris = true;camera.AutoPan = false;camera.AutoRoll = false;camera.AutoTilt = false;camera.AutoZoom = true;// now try to set some camera manual propertiescamera.Exposure = camera.ExposureInfo.Min;camera.Focus = camera.FocusInfo.Max;camera.Iris = camera.IrisInfo.Default;camera.Pan = camera.PanInfo.Min;camera.Roll = camera.RollInfo.Min;camera.Tilt = camera.TiltInfo.Min;camera.Zoom = camera.ZoomInfo.Min;// now increment a property by the stepping deltacamera.Exposure += camera.ExposureInfo.StepDelta;// set the result to what we expect_result = (camera.Exposure == camera.ExposureInfo.Min + camera.ExposureInfo.StepDelta);// now check a property to see if it is supported and has a manual setting// if so, set it to autoif (camera.ExposureInfo.Flags != CameraControlFlags.Unsupported&& camera.ExposureInfo.Flags == CameraControlFlags.Manual)camera.AutoExposure = true;// set the result to what we expect_result &= (camera.ExposureInfo.Flags == CameraControlFlags.Auto);}// continue setting capture settings// and possibly start a capture process// ...}catch (Exception){_result = false;}}
Imports LeadtoolsImports Leadtools.MultimediaImports LeadtoolsMultimediaExamples.FixturesPublic _result As Boolean = FalsePublic _form As CaptureCtrlForm = New CaptureCtrlForm()Public Sub CameraControlExample()' reference the capture controlDim capturectrl As CaptureCtrl = _form.CaptureCtrlTry' try to find a USB video device, use your device name hereIf capturectrl.VideoDevices("USB") Is Nothing ThenThrow New Exception("No USB video device available")End Ifcapturectrl.VideoDevices("USB").Selected = True' reference the camera controlDim camera As CameraControl = capturectrl.CameraControlIf Not camera Is Nothing Then' try to set some camera auto propertiescamera.AutoExposure = Truecamera.AutoFocus = Truecamera.AutoIris = Truecamera.AutoPan = Falsecamera.AutoRoll = Falsecamera.AutoTilt = Falsecamera.AutoZoom = True' now try to set some camera manual propertiescamera.Exposure = camera.ExposureInfo.Mincamera.Focus = camera.FocusInfo.Maxcamera.Iris = camera.IrisInfo.Defaultcamera.Pan = camera.PanInfo.Mincamera.Roll = camera.RollInfo.Mincamera.Tilt = camera.TiltInfo.Mincamera.Zoom = camera.ZoomInfo.Min' now increment a property by the stepping deltacamera.Exposure += camera.ExposureInfo.StepDelta' set the result to what we expect_result = (camera.Exposure = camera.ExposureInfo.Min + camera.ExposureInfo.StepDelta)' now check a property to see if it is supported and has a manual setting' if so, set it to autoIf camera.ExposureInfo.Flags <> CameraControlFlags.Unsupported AndAlso camera.ExposureInfo.Flags = CameraControlFlags.Manual Thencamera.AutoExposure = TrueEnd If' set the result to what we expect_result = _result And (camera.ExposureInfo.Flags = CameraControlFlags.Auto)End If' continue setting capture settings' and possibly start a capture process' ...Catch e1 As Exception_result = FalseEnd TryEnd Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
