I have a realsense camera and I'm trying to read a 16 bit depth image. I have a problem - when I create direct opencv mat with 16 bit values I see only black image. When I convert 16 bit image to 8 bit with 255/1000 scale, I get normal image, but I don't want to lose that information.
depthImage->AcquireAccess(PXCImage::ACCESS_READ, PXCImage::PIXEL_FORMAT_DEPTH, &depthImgData);
pxcBYTE* cpixels = depthImgData.planes[0];
Mat r_depth(frameSize, CV_16UC1, cpixels);
Here's my code, where I convert image.
Could you please tell me what is the reason of such behaviour and how to get 16 bit image?