Hello.
I’m attempting to convert a VideoFrameRef from depth videoStream to OpenCV mat.
this is the code to do this data transformation in this moment:
depthFrame = depth.readFrame(); ByteBuffer pix=depthFrame.getData(); indent preformatted text by 4 spaces Mat depthprev=new Mat(); depthprev.create(depthFrame.getHeight(), depthFrame.getWidth(), CvType.CV_8UC2); byte arr[]=new byte [pix.remaining()]; pix.get(arr); depthprev.put(0,0,arr);
for this code i can get the values returned by OpenNI framework, but i can’t transform to see the result in a bitmap object needed in my app requeriments.
Can anyone help me?
Thank you.