Camera
This section provides guidance for creating WinUI 3 apps that use the camera or microphone to capture photos, video, or audio.
Basic MediaCapture tasks
Topic | Description |
---|---|
Show the camera preview in a WinUI 3 app | Shows how to quickly display the camera preview stream within a XAML page in a WinUI 3 app. |
Basic photo, video, and audio capture with MediaCapture | Shows the simplest way to capture photos and video using the MediaCapture class. The MediaCapture class exposes a robust set of APIs that provide low-level control over the capture pipeline and enable advanced capture scenarios, but this article is intended to help you add basic media capture to your app quickly and easily. |
Advanced MediaCapture tasks
Topic | Description |
---|---|
Discover and select camera capabilities with camera profiles | Learn how to use camera profiles to discover and manage the capabilities of different video capture devices. This includes tasks such as selecting profiles that support specific resolutions or frame rates, profiles that support simultaneous access to multiple cameras, and profiles that support HDR. |
Set format, resolution, and frame rate for MediaCapture | Learn how to use the IMediaEncodingProperties interface to set the resolution and frame rate of the camera preview stream and captured photos and video. It also shows how to ensure that the aspect ratio of the preview stream matches that of the captured media. |
HDR and low-light photo capture | Learn how to use the AdvancedPhotoCapture class to capture High Dynamic Range (HDR) and low-light photos. |
Manual camera controls for photo and video capture | Learn how to use manual device controls to enable enhanced photo and video capture scenarios including optical image stabilization and smooth zoom. |
Manual camera controls for video capture | Learn how to use manual device controls to enable enhanced video capture scenarios including HDR video and exposure priority. |
Video stabilization effect for video capture | Learn how to use the video stabilization effect. |
Scene analysis for MediaCapture | Shows you how to use the SceneAnalysisEffect and the FaceDetectionEffect to analyze the content of the media capture preview stream. |
Capture a photo sequence with VariablePhotoSequence | Learn how to capture a variable photo sequence, which allows you to capture multiple frames of images in rapid succession and configure each frame to use different focus, flash, ISO, exposure, and exposure compensation settings. |
Process media frames with MediaFrameReader | Learn how to use a MediaFrameReader with MediaCapture to get media frames from one or more available sources, including color, depth, and infrared cameras, audio devices, or even custom frame sources such as those that produce skeletal tracking frames. This feature is designed to be used by apps that perform real-time processing of media frames, such as augmented reality and depth-aware camera apps. |
Process audio frames with MediaFrameReader | Learn how to use a MediaFrameReader with MediaCapture to get audio data from a media frame source. |
Detect and respond to audio level changes by the system | Learn how to detect and respond to audio level changes by the system. |
Launch the camera settings page | Learn how to launch the Windows Settings app directly to the camera settings page. |
Handle the Windows camera privacy setting | Learn how apps should handle the Windows camera privacy setting. |
Connect to remote cameras | Learn how to connect to remote cameras and get a MediaFrameSourceGroup to retrieve frames from each camera. |
WinUI 3 samples for camera
UWP app samples for camera
- Camera face detection sample
- Camera preview frame sample
- Camera HDR sample
- Camera manual controls sample
- Camera profile sample
- Camera resolution sample
- Camera starter kit
- Camera video stabilization sample
Related topics
Colaborar con nosotros en GitHub
El origen de este contenido se puede encontrar en GitHub, donde también puede crear y revisar problemas y solicitudes de incorporación de cambios. Para más información, consulte nuestra guía para colaboradores.