Digital cameras are basically the same as film cameras in their handling. They both have a lens to focus the specific image, a shutter to let light inside the camera, and an aperture to control the amount of light which enters the camera.
The differences between digital and traditional photography happen to be after the light enters the camera. A traditional camera captures the images on film, while a digital camera captures the image on an image sensor.
Image sensors are electronic devices made up of an array of electrodes (or photosites) that calculate light intensity. The most universally recognized type of image sensor for digital cameras is the CCD (Charge-Coupled Device) although others such as CMOS and Foveon are sometimes used.
The number of photosites in the image sensor gives the digital camera its megapixel (millions of pixels) rating. Each photosite corresponds to a pixel in the final image, so a camera that is rated at six megapixels, for example, has an image sensor that is 3008 pixels wide by 2000 pixels high.
When light hits the image sensor it is converted into electrical signals which are built-up and fed to an analog-to-digital (A/D) converter. The A/D converter changes the electrical signal into binary numbers which are processed by a computer housed in the camera body. Once the numbers have been harvested the resulting image is stored on a memory card.
Photosites can only measure the intensity of light — not color. In order to produce a color image, each photosite must be covered with a colored filter that can be red, blue, or green. These are the three primary colors that can be combined to produce any other color including white.
The colored filters are arranged in a grid so that there are twice as many green filters as there are red or blue. This is because the human eye is twice as sensitive to green light. Filters are arranged in a pattern called the Bayer pattern – one row of red, green, red, green (etc.), and the next row of blue, green, blue, green (etc).
Since each photosite can only be covered with one colored filter, computer processing is necessary to produce a full-colored image. This is done by analyzing a certain pixel and its immediate neighbors and producing a composite color from these calculations. For example, if a bright red pixel is surrounded by bright green and bright blue pixels, the bright red pixel must undeniably be white, because white is the combination of red, blue, and green. This process is called demosaicing.
After demosaicing the image is adjusted according to the settings on your camera. Most cameras have settings for brightness, contrast, and color saturation. After these adjustments are made some cameras may also apply a sharpening algorithm to make the image clearer.
The final step before saving the image on the memory card is to compress it. Most cameras use JPEG as a compression format. This reduces the size of the file by eliminating excess data. This information cannot be recovered, so JPEG is called a ‘lossy’ format.
Several cameras have the ability to save uncompressed images as TIFF files or raw data. Raw data is the original photosite data even before demosaicing. It can be transferred to a computer for processing with special software that will perform all of the processing functions of the camera but with much greater control.