#

Win10 Sample: CameraGetPreviewFrame
 
Kamera Vorschaurahmen Probe
Dieses Beispiel gilt eine End-to-End-Ansatz zu zeigen, wie eine Kamera-Anwendung mit der Windows.Media.Capture API in Verbindung mit dem Display Information-API zu schreiben, um Bilder in der Vorschau von der Kamera Strom für die weitere Verarbeitung.
 
Camera preview frame sample
This sample applies an end-to-end approach to demonstrate how to write a camera application using the Windows.Media.Capture API in conjunction with the DisplayInformation API to acquire preview frames from the camera stream for further processing.
 
 
 
  1. Manage the MediaCapture object throughout the lifecycle of the app and through navigation events.
  2. Acquire a camera located on a specific side of the device. In this case, the sample attempts to get the rear camera.
  3. Start and stop the preview to a UI element, including mirroring for front-facing cameras.
  4. Get a preview frame using both overloads for the method.
    1. Get it as a Direct3DSurface and display information about the frame: Width, Height, Format.
    2. Get it as a SoftwareBitmap, display information about the frame: Width, Height, Format, and optionally display it on the screen and/or save it to disk.
  5. Handle page rotation events to apply any necessary corrections to the preview stream rotation, ensuring acquired preview frames have the correct orientation and aspect ratio.
  6. Handle MediaCapture Failed event to clean up the MediaCapture instance when an error occurs.

 
 
Files im Sample:
Hauptsächlich die MainPage.xaml

 
Quelle: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CameraGetPreviewFrame  
Mobile

.

123movies