Open AR-Vsx opened 2 years ago
Could you try changing it from CvType.CV_16UC1 to CvType.CV_8UC1?
//depthBuffer contains the encoded png data as byte[]
Mat buff = new Mat(1, depthBuffer.Length, CvType.CV_8UC1);
Changing the type worked, but as soon as I choose a higher png compression level than zero the Editor crashes instantly. I'm also using opencv to encode the depth image I receive from the Kinect in a seperate c++ application.
Hi, I'm trying to decode a 16-bit png encoded depth image from the Kinect Azure. Since the depth image is transmitted via network I receive the data as a byte array. For some reason the Editor crashes after a while during the decoding process. Sometimes it even crashes right on startup.
Stacktrace:
Code :
I tried disposing the Mats since it feels like a memory issue but with no luck. I'm using Unity 2021.2.10 and OpenCVForUnity 2.8.4 on Windows 10.