/// <summary> /// This event will be raised every time the effect processes a preview frame, to deliver information about the current scene in the camera preview. /// </summary> /// <param name="sender">The effect raising the event.</param> /// <param name="args">The event data.</param> private async void SceneAnalysisEffect_SceneAnalyzed(SceneAnalysisEffect sender, SceneAnalyzedEventArgs args) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { // Create a graphical representation of how much detail could be recovered through an HDR capture, ranging // from 0 ("everything is within the dynamic range of the camera") to CERTAINTY_CAP ("at this point the app // strongly recommends an HDR capture"), where CERTAINTY_CAP can be any number between 0 and 1. HdrImpactBar.Value = Math.Min(CERTAINTY_CAP, args.ResultFrame.HighDynamicRange.Certainty); }); }