Hololens2 poor performance while get camera frames

ts_sinwh 41 Reputation points
2022-09-15T12:01:28.02+00:00

i need get hololens camera frames real time. at least 30 fps.
then i found this sample Windows-universal-samples/CameraFrames.
this sample use windows.media.capture.mediacapture and windows.media.capture.frames.mediaframereader.
there be unstable fps (10-20) and high cpu usage when i run this sample on hololens2.

is anything wrong with this sample? or with hololens2?
if you know that please let me know.
if you know other way to get frames on hololens2, please let me know.

Universal Windows Platform (UWP)
HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
380 questions
0 comments No comments
{count} votes

Accepted answer
  1. Zuocheng Wang - MSFT 3,081 Reputation points Microsoft Vendor
    2022-09-16T09:07:31.277+00:00

    Hello, Welcome to Microsoft Q&A,

    In my test, when just running this sample, the frame rate (about 50) and CPU usage are in a reasonable range. And you can try to choose a lower resolution Media format to reduce consumption. Also, are you running the application in debug mode? This will cost more performance.

    ----
    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful