示例#1
0
            public async Task <MediaCaptureWrapper> Create()
            {
                var wrapper = new MediaCaptureWrapper();
                await wrapper.Initialize();

                return(wrapper);
            }
示例#2
0
        /// <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);
            });
        }