carlren / OpenNICalibTool

Calibration tool for OpenNI sensors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IR image format

YingGwan opened this issue · comments

Hi, I am now running your code, but I found one setting was not so good with Realsense D416:

In Save IR image, It takes each pixel 8 bits to save the information, however the code is GrayScale8Pixel.
I think it should be adaptive according to different cameras.

Also, OpenCV directly supports another data transfer to cv::Mat:
For example:
cv::Mat grayImg_temp(cv::Size(640, 480), CV_8UC1, (void*)openni_device_data.IRFrame.getData(), cv::Mat::AUTO_STEP);

If you are using camera with 16 unsigned char to store gray value, you could modify it to be :
cv::Mat grayImg_temp(cv::Size(640, 480), CV_16UC1, (void*)openni_device_data.IRFrame.getData(), cv::Mat::AUTO_STEP);

Hope people after me could avoid this debug procedure.

Handwriting error, it is actually Realsense D415