How does the RGB-D camera obtain depth information?

With the continuous evolution of technology, the emergence of depth cameras allows us to obtain the depth of images more conveniently. One of the depth cameras is an RGB-D camera based on structured light. Taking a human face as an example, the scanner emits a light pattern on the target face, and calculates the shape of the surface based on its deformation, thereby calculating the depth information of the face.

How does the RGB camera achieve a one-to-one correspondence between depth and RGB? After measuring the depth, the RGB-D camera usually completes the pairing between the depth and the color map pixels according to the placement of each camera during production, and outputs a one-to-one corresponding color map and depth map. We can read the color information and distance information at the same image location, calculate the 3D camera coordinates of the pixels, and generate a point cloud.