How Digital Cameras Work: Image Sensors
One of the biggest shifts in photography since the implementation of the original SLR film camera was the invention of the CMOS and CCD Sensors, or image sensor. This is a special device that allows light to be converted into an electronic file. Every digital camera whether DSLR, medium format, or point and shoot (even your cell phone camera) has an image sensor.
How Image Sensors Work
Image sensors work similar to solar panels. They take light and convert it into an electronic signal. While this is the absolute basic function of an image sensor, they are a lot more complicated than that. When light passes through a lens and the shutter it reaches the the photoelectric circuitry of the image sensor. This sensor is comprised of millions of photosensitive semiconductors (like photovoltaic cells) that when exposed to light photons they convert them into electrons. The intensity of the electronic current created by each of the semiconductors is dependent on the intensity of the light. Essentially more light photons mean more electrons.
Once the light photons are converted into the electric signal these signals are sent to the circuit board in the camera body here through the magic of electronic microchips and fairy dust the electronic signals are converted into binary, the fundamental base language of all computers (1′s and 0′s). This binary code is used by the computer in the camera to create individual pixels. The same code allows the computer to place these pixels into a specific arrangement to create an image.
This is essentially where your megapixels come from. Megapixels are a relation of the number of photovoltaic cells on the image conductor. Megapixels is typically the number of pixels in an entire area (the horizontal width of pixels by the vertical length of pixels). To really simplify this concept, you can see the megapixels as the number of photovoltaic cells on a single image sensor.
Types of Image Censors
CMOS sensors are very common in digital cameras. These sensors work fairly well, but tend to distribute a higher amount of noise in an image than CCD. The way CMOS sensors are built typically makes them much less photosensitive. This is because they are built with transistors in close proximity to the semiconductors, meaning that much of the light is lost on the transistors. While CMOS sensors typically provide lower quality than CCD sensors they do have a massive advantage. CMOS sensors use much less power than a CCD sensor, allowing longer battery life, and can be manufactured much more cost efficiently than CCD sensors.
CCD sensors are in most ways better than a CMOS sensor. They tend to produce higher quality images with lower noise, and are much more photosensitive. The CCD sensor has also been around much longer than the CMOS sensor, giving them more time to perfect the development of these sensors. The biggest downside to the CCD sensor is that it consumes over 100x more power than a CMOS sensor, and that the fabrication of these sensors even on the mass production scale is very costly.