public async Task <MediaCaptureWrapper> Create() { var wrapper = new MediaCaptureWrapper(); await wrapper.Initialize(); return(wrapper); }
/// <summary> /// Invoked when this page is about to be displayed in a Frame. /// </summary> /// <param name="e">Event data that describes how this page was reached. /// This parameter is typically used to configure the page.</param> protected async override void OnNavigatedTo(NavigationEventArgs e) { _captureManager = await new MediaCaptureWrapperFactory().Create(); capturePreview.Source = _captureManager.MediaCapture; // _captureManager.StartPreview(); var picturesLibrary = await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures); await Task.Run(() => { _classifier = NeuralNetFactory.CreateNetWithPredefinedWeights(picturesLibrary.SaveFolder.Path + @"\weights.txt", 13, 6); }); }