Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Didn't test your code, but you are probably using wrong the AccessUnderlyingBuffer. You shouldn't access directly the BufferMat.data. Try instead:

unsigned short *pBuffer;
pDepthFrame->AccessUnderlyingBuffer(&nBufferSize, &pBuffer);
DepthMat.create(width,height,pBuffer,CV_16U);