Ask Your Question

Revision history [back]

Mat lFrame(480, 640, CV_16U, (uchar *)dev->get_frame_data(rs::stream::infrared));

For me this seems weird. You have a 16 bit output image that you want, but you are jumping in memory with a uchar pointer, which is typically for 8 bit. Shouldn't it be at least Mat lFrame(480, 640, CV_16U, (float *)dev->get_frame_data(rs::stream::infrared)); to get 16 bit pointers?