While reading a captured Kinect Depth Image, it is important to read it in a way that retains the original data. Using a regular cv::imread function call can significantly modify the data stored in a Kinect Depth Image. This is because of the fact that a regular cv::imread function call uses default method, which assumes:
To read a Depth Image use cv::imread function with CV_LOAD_IMAGE_UNCHANGED flag. This will not change the data, reading it in its original state.
e.g. cv::imread("DepthInput.png", CV_LOAD_IMAGE_UNCHANGED);
I will be updating this post later to include details on how to capture and store a data stream from Kinect using OpenCV.
- The input image is color (three channels: RGB)
- The depth (number of bits per pixel) of input image is UCHAR (CV_8U) or 8bits/pixel
To read a Depth Image use cv::imread function with CV_LOAD_IMAGE_UNCHANGED flag. This will not change the data, reading it in its original state.
e.g. cv::imread("DepthInput.png", CV_LOAD_IMAGE_UNCHANGED);
I will be updating this post later to include details on how to capture and store a data stream from Kinect using OpenCV.