publicVideoProcAmpInfoGainInfo {get; }
PublicReadOnlyPropertyGainInfoAsVideoProcAmpInfo
public:propertyVideoProcAmpInfo^GainInfo {VideoProcAmpInfo^get();}
AVideoProcAmpInfoobject.
The information returned for this property is aVideoProcAmpInfoobject containing all the related property information.
usingLeadtools;usingLeadtools.Multimedia;usingLeadtoolsMultimediaExamples.Fixtures;publicbool_result =false;publicCaptureCtrlForm _form =newCaptureCtrlForm();publicVideoProcAmp _videoprocamp;publicstring_outFile = Path.Combine(LEAD_VARS.MediaDir,"VideoProcAmp_SetAutoValueExample.avi");// this example demonstrates how to set an auto value on the// video proc amp object.publicvoidSetManualValueExample(){// reference the capture controlCaptureCtrl capturectrl = _form.CaptureCtrl;try{// select the first device with Logitech in it's name// Replace "Logitech" with your video capture device nameif(capturectrl.VideoDevices["Logitech"] ==null)thrownewException("No Logitech video devices available!");capturectrl.VideoDevices["Logitech"].Selected =true;// set a video compressorcapturectrl.VideoCompressors.Mpeg2.Selected =true;// set the target filecapturectrl.TargetFile = _outFile;// reference the video proc amp_videoprocamp = capturectrl.VideoProcAmp;// try to set the auto valueif(_videoprocamp !=null){// set the saturation to the maximum supported value_videoprocamp.Saturation = _videoprocamp.SaturationInfo.Max;// set the sharpness to the minimum value_videoprocamp.Sharpness = _videoprocamp.SharpnessInfo.Min;// set the white balace to the maximum value_videoprocamp.WhiteBalance = _videoprocamp.WhiteBalanceInfo.Max;// set the hue to the minimum value// later in the timer we will bump this value using the stepDelta_videoprocamp.Hue = _videoprocamp.HueInfo.Min;// subscribe to the capture progress event// so we can play with the hue setting abovecapturectrl.Progress +=newProgressEventHandler(CaptureCtrl_Progress);}// check for video capture availableif(capturectrl.IsModeAvailable(CaptureMode.Video)){// capture 15 seconds of videocapturectrl.UseTimeLimit =true;capturectrl.TimeLimit = 15;// subscribe to the compete eventcapturectrl.Complete +=newEventHandler(CaptureCtrl_Complete);// start the capturecapturectrl.StartCapture(CaptureMode.Video);}}catch(Exception){_result =false;}// we'll loop on the state and pump messages for this example.// but you should not need to if running from a Windows Forms application.while(capturectrl.State == CaptureState.Running)Application.DoEvents();}voidCaptureCtrl_Progress(objectsender, ProgressEventArgs e){if(_videoprocamp !=null){// roll the hue value around while capturing_videoprocamp.Hue += _videoprocamp.HueInfo.StepDelta;// reset it to the minimum if we reach the maxif(_videoprocamp.Hue >= _videoprocamp.HueInfo.Max)_videoprocamp.Hue = _videoprocamp.HueInfo.Min;}}voidCaptureCtrl_Complete(objectsender, EventArgs e){// set the result to what we expect_result = File.Exists(_outFile);}staticclassLEAD_VARS{publicconststringMediaDir =@"C:\LEADTOOLS21\Media";}
ImportsLeadtoolsImportsLeadtools.MultimediaImportsLeadtoolsMultimediaExamples.FixturesPublic_resultAsBoolean=FalsePublic_formAsCaptureCtrlForm =NewCaptureCtrlForm()Public_videoprocampAsVideoProcAmpPublic_outFileAsString= Path.Combine(LEAD_VARS.MediaDir,"VideoProcAmp_SetAutoValueExample.avi")' this example demonstrates how to set an auto value on the' video proc amp object.PublicSubSetManualValueExample()' reference the capture controlDimcapturectrlAsCaptureCtrl = _form.CaptureCtrlTry' select the first device with analog in it's name' Replace "Analog" with your video capture device nameIfcapturectrl.VideoDevices("Logitech")IsNothingThenThrowNewException("No Logitech video devices available!")EndIfcapturectrl.VideoDevices("Logitech").Selected =True' set a video compressorcapturectrl.VideoCompressors.Mpeg2.Selected =True' set the target filecapturectrl.TargetFile = _outFile' reference the video proc amp_videoprocamp = capturectrl.VideoProcAmp' try to set the auto valueIfNot_videoprocampIsNothingThen' set the saturation to the maximum supported value_videoprocamp.Saturation = _videoprocamp.SaturationInfo.Max' set the sharpness to the minimum value_videoprocamp.Sharpness = _videoprocamp.SharpnessInfo.Min' set the white balace to the maximum value_videoprocamp.WhiteBalance = _videoprocamp.WhiteBalanceInfo.Max' set the hue to the minimum value' later in the timer we will bump this value using the stepDelta_videoprocamp.Hue = _videoprocamp.HueInfo.Min' subscribe to the capture progress event' so we can play with the hue setting aboveAddHandlercapturectrl.Progress,AddressOfCaptureCtrl_ProgressEndIf' check for video capture availableIfcapturectrl.IsModeAvailable(CaptureMode.Video)Then' capture 15 seconds of videocapturectrl.UseTimeLimit =Truecapturectrl.TimeLimit = 15' subscribe to the compete eventAddHandlercapturectrl.Complete,AddressOfCaptureCtrl_Complete' start the capturecapturectrl.StartCapture(CaptureMode.Video)EndIfCatche1AsException_result =FalseEndTry' we'll loop on the state and pump messages for this example.' but you should not need to if running from a Windows Forms application.DoWhilecapturectrl.State = CaptureState.RunningApplication.DoEvents()LoopEndSubPrivateSubCaptureCtrl_Progress(ByValsenderAsObject,ByValeAsProgressEventArgs)IfNot_videoprocampIsNothingThen' roll the hue value around while capturing_videoprocamp.Hue += _videoprocamp.HueInfo.StepDelta' reset it to the minimum if we reach the maxIf_videoprocamp.Hue >= _videoprocamp.HueInfo.MaxThen_videoprocamp.Hue = _videoprocamp.HueInfo.MinEndIfEndIfEndSubPrivateSubCaptureCtrl_Complete(ByValsenderAsObject,ByValeAsEventArgs)' set the result to what we expect_result = File.Exists(_outFile)EndSubPublicNotInheritableClassLEAD_VARSPublicConstMediaDirAsString="C:\LEADTOOLS21\Media"EndClass
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
188宝金博怎么下载
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.
