Exemplo n.º 1
0
        public async Task UpdateStatistics(IImageData imageData)
        {
            var exposureTime = imageData.MetaData.Image.ExposureTime;
            var statistics   = await AllImageStatistics.Create(imageData);

            statistics.PropertyChanged += Child_PropertyChanged;
            Statistics = statistics;
            if (exposureTime >= 0)
            {
                var imageStatistics = await imageData.Statistics.Task;
            }
        }
Exemplo n.º 2
0
        private async Task <AllImageStatistics> TakeExposure(double exposureDuration)
        {
            _cts?.Dispose();
            _cts = new CancellationTokenSource();

            var seq = new CaptureSequence(exposureDuration, CaptureSequence.ImageTypes.SNAPSHOT, SnapFilter, new Model.MyCamera.BinningMode(1, 1), 1);

            seq.Gain = SnapGain;
            var prepareParameters = new PrepareImageParameters(autoStretch: true, detectStars: false);
            var capture           = await _imagingMediator.CaptureAndPrepareImage(seq, prepareParameters, _cts.Token, null); //todo progress

            return(await AllImageStatistics.Create(capture.RawImageData));
        }