protected override List <IOptionEntry> generateEntries(CameraOptionsUI options, string libraryVersion)
        {
            List <IOptionEntry> entries = new List <IOptionEntry>();

            OptionsCategory GainCategory = new OptionsCategory("Gain");

            entries.Add(GainCategory);

            FloatEntry GainEntry = new FloatEntry("Gain", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.Gain)), options.Stream);

            GainEntry.Parent = GainCategory;

            EnumEntry <GainAutoEnums> AutoGainEntry = new EnumEntry <GainAutoEnums>("Auto Gain", GainAutoEnums.Off, GainAutoEnums.NUM_GAINAUTO, new Property <FlirProperties, EnumNode <GainAutoEnums> >(nameof(options.FakeProperties.GainAuto)), options.Stream);

            AutoGainEntry.Parent = GainCategory;

            FloatEntry UpperGainEntry = new FloatEntry("  - Upper Limit", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.AutoGainUpperLimit)), options.Stream);

            UpperGainEntry.Parent = GainCategory;

            FloatEntry LowerGainEntry = new FloatEntry("  - Lower Limit", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.AutoGainLowerLimit)), options.Stream);

            LowerGainEntry.Parent = GainCategory;

            return(entries);
        }
Exemple #2
0
        protected override List <IOptionEntry> generateEntries(CameraOptionsUI options, string libraryVersion)
        {
            List <IOptionEntry> entries = new List <IOptionEntry>();

            OptionsCategory ExposureCategory = new OptionsCategory("Exposure");

            entries.Add(ExposureCategory);

            EnumEntry <ExposureAutoEnums> ExposureAutoEntry = new EnumEntry <ExposureAutoEnums>("Auto Exposure", ExposureAutoEnums.Continuous, ExposureAutoEnums.NUM_EXPOSUREAUTO, new Property <FlirProperties, EnumNode <ExposureAutoEnums> >(nameof(options.FakeProperties.ExposureAuto)), options.Stream);

            ExposureAutoEntry.Parent = ExposureCategory;

            FloatEntry UpperExposureEntry = new FloatEntry("  - Upper Limit", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.ExposureAutoUpperLimit)), options.Stream);

            UpperExposureEntry.Parent = ExposureCategory;

            FloatEntry LowerExposureEntry = new FloatEntry("  - Lower Limit", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.ExposureAutoLowerLimit)), options.Stream);

            LowerExposureEntry.Parent = ExposureCategory;

            FloatEntry ExposureTimeEntry = new FloatEntry("Exposure Time", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.ExposureTime)), options.Stream);

            ExposureTimeEntry.Parent = ExposureCategory;

            FloatEntry ExposureTimeAbsEntry = new FloatEntry("Absolute Exposure Time", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.ExposureTimeAbs)), options.Stream);

            ExposureTimeAbsEntry.Parent = ExposureCategory;

            return(entries);

            /*
             * ExposureMode = new EnumNode<ExposureModeEnums>(camera, "ExposureMode");
             */
        }
 /// <summary>
 /// This is the click handler for the 'ShowSettings' button.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ShowSettings_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (mediaCaptureMgr != null)
         {
             // Using Windows.Media.Capture.CameraOptionsUI API to show webcam settings
             CameraOptionsUI.Show(mediaCaptureMgr);
         }
     }
     catch (Exception ex)
     {
         rootPage.NotifyUser(ex.Message, NotifyType.ErrorMessage);
     }
 }
        public void ShowCameraSettings()
        {
            // If the capture manager has not been initialized, nothing to show
            if (_captureManager == null)
            {
                return;
            }

            var captureMode = _captureManager.MediaCaptureSettings.StreamingCaptureMode;

            if (captureMode == StreamingCaptureMode.Audio)
            {
                // No video to capture.  We're done.
                return;
            }

            // Display capture options UI
            CameraOptionsUI.Show(_captureManager);
        }
Exemple #5
0
        private async Task CaptureImage()
        {
            // Capture a new photo or video from the device.
            cameraCapture         = new MediaCapture();
            cameraCapture.Failed += cameraCapture_Failed;

            // Initialize the camera for capture.
            await cameraCapture.InitializeAsync();

            if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Media.Capture.CameraOptionsUI"))
            {
                CameraOptionsUI.Show(cameraCapture);
            }

            captureGrid.Visibility    = Windows.UI.Xaml.Visibility.Visible;
            previewElement.Visibility = Windows.UI.Xaml.Visibility.Visible;
            previewElement.Source     = cameraCapture;
            await cameraCapture.StartPreviewAsync();
        }
Exemple #6
0
        protected override List <IOptionEntry> generateEntries(CameraOptionsUI options, string libraryVersion)
        {
            List <IOptionEntry> entries = new List <IOptionEntry>();

            OptionsCategory InfoCategory = new OptionsCategory("Info");

            entries.Add(InfoCategory);

            ConstantValueEntry LibraryVersionEntry = new ConstantValueEntry("Library Version", libraryVersion);

            LibraryVersionEntry.Parent = InfoCategory;

            StringEntry VendorNameEntry = new StringEntry("Vendor Name", new Property <FlirProperties, StringNode>(nameof(options.FakeProperties.DeviceVendorName)), options.Stream);

            VendorNameEntry.Parent = InfoCategory;

            StringEntry ModelName = new StringEntry("Model Name", new Property <FlirProperties, StringNode>(nameof(options.FakeProperties.DeviceModelName)), options.Stream);

            ModelName.Parent = InfoCategory;

            return(entries);
        }
Exemple #7
0
 public CameraInfoUI(CameraOptionsUI options, OptionsPanel panel, string libraryVersion) : base(options, panel, libraryVersion)           //TODO version is hacky
 {
 }
 public GainUI(CameraOptionsUI options, OptionsPanel panel) : base(options, panel, null)
 {
 }
Exemple #9
0
 public ExposureUI(CameraOptionsUI options, OptionsPanel panel) : base(options, panel, null)
 {
 }
 public CameraOptionsForm(FlirCameraManager cameraManager, FlirCameraStream stream)
 {
     InitializeComponent();
     cameraOptions           = new CameraOptionsUI(SettingsPanel, stream, cameraManager.GetSpinnakerLibraryVersion());
     stream.OnSourceChanged += CameraStream_OnSourceChanged;
 }