From light to numbers
As Britannica explains, a camera collects light and records an image of it. In a robot, the image is a grid of numbers. Each small square of the grid is a pixel, and each pixel gets a number for its brightness and color. For a computer, a picture is just that grid.
The color camera
The most common robot camera is the RGB camera. It records red, green and blue light, like the camera in your phone. It shows colors, shapes, text and faces. A robot uses it to recognize objects, read a label or follow a person. The software that makes sense of these pictures belongs to the field of computer vision.
One camera has a limit. The picture is flat, so it does not say how far away each thing is.
Two eyes are better than one
One way to get distance is stereo vision. Two cameras sit a few centimeters apart (about 1 to 2 inches) and look at the same scene. A near object appears at slightly different places in the two pictures. The size of that shift tells how far the object is.
Depth cameras
A depth camera gives a distance for every pixel. Many of them use stereo vision inside. A camera that gives color and depth together is called an RGB-D camera. A robot arm can use it to find where a box is. A mobile robot can use it to see a wall or a person in front of it.
A real example is the Intel RealSense D435, used in many robots. Intel says it works best between 0.3 and 3 meters (about 1 to 10 feet). Closer than that, or much farther, the distance numbers become less reliable.
Swipe the diagram to see all of it.
Other kinds of camera
Some cameras see things a normal camera cannot. Event cameras react to change, and thermal cameras see heat. The lesson on event and thermal cameras explains both.
Taking a picture takes time
A camera does not always capture a whole picture at one instant. With a global shutter, all pixels are exposed together. With a rolling shutter, the lines are read one after another, so a fast object looks slanted. Intel says the global shutter of the D435 suits fast-moving robots.
Swipe the diagram to see all of it.