microsoft / HoloLens2ForCV

Sample code and documentation for using the Microsoft HoloLens 2 for Computer Vision research.
MIT License
479 stars 144 forks source link

Low resolution on PV stream #160

Open TimSchoonbeek opened 1 year ago

TimSchoonbeek commented 1 year ago

Hello everyone,

I am trying out this library and found that the PV camera images are only 760x428 pixels. Is there a reason for this? The camera should have much higher resolution, so I do not understand why it does not save this. I am recording long throw, eye tracking, and PV.

Additionally, the PV stream gets saved in raw format, which takes up a lot of space. I want to record +- 15 minute videos, which currently would result in approximately 35GB of data (and probably a crashing app). Is it possible to adjust the code to save directly in .png, which would save around a factor 5 in file size?

Thanks in advance for your answers.

michalt38 commented 1 year ago

PV camera can work in the following profiles: https://learn.microsoft.com/en-us/windows/mixed-reality/develop/advanced-concepts/locatable-camera-overview.

StreamRecorder by default uses a profile that captures images in 760x428 resolution. You can change this setting a different value of kImageWidth (VideoFrameProcessor.cpp, 23rd line): https://github.com/microsoft/HoloLens2ForCV/blob/main/Samples/StreamRecorder/StreamRecorderApp/VideoFrameProcessor.cpp