HoloLensCameraStream
HoloLensCameraStream copied to clipboard
Resolution 896X504 not working on hololens 2
Hello,
I’m working with the HololensCameraStream in my project. Until now, I was working with 2272x1278 resolution without any issues. However, after reducing the resolution to 896x504, the output image becomes corrupted:
Below is the code snippet where I configure the camera resolution:
_resolution = CameraStreamHelper.Instance.GetLowestResolution();
float frameRate = CameraStreamHelper.Instance.GetLowestFrameRate(_resolution);
video.FrameSampleAcquired += OnFrameSampleAcquired;
CameraParameters cameraParameters = new CameraParameters();
cameraParameters.hologramOpacity = 0.0f;
cameraParameters.frameRate = Mathf.RoundToInt(frameRate);
cameraParameters.cameraResolutionWidth = _resolution.width;
cameraParameters.cameraResolutionHeight = _resolution.height;
cameraParameters.pixelFormat = CapturePixelFormat.BGRA32;
video.StartVideoModeAsync(cameraParameters, OnStartedVideoCaptureMode);
Do you have any insights on what might be causing this image corruption when changing resolutions?
Thank you in advance for your support