Back in Chapter 2, Handling Files, Cameras, and GUIs, we discussed the concept that a computer can have multiple video capture devices and each device can have multiple channels. Suppose a given device is a depth camera. Each channel might correspond to a different lens and sensor. Also, each channel might correspond to different kinds of data, such as a normal color image versus a depth map. OpenCV, via its optional support for OpenNI 2, allows us to request any of the following channels from a depth camera (though a given camera might support only some of these channels):
- cv2.CAP_OPENNI_DEPTH_MAP: This is a depth map—a grayscale image in which each pixel value is the estimated distance from the camera to a surface. Specifically, each pixel value is a 16-bit unsigned integer representing a depth measurement in millimeters.
- cv2.CAP_OPENNI_POINT_CLOUD_MAP...