An image can be abstracted as a function:
Where
(non-negative reals) for grayscale images; each pixel represents only brightness and no color. (combinations of 3 sets of non-negative reals), which is a color image with red/green/blue values for each pixel.
Pixels
A pixel from a camera or scanner is a measurement of the average color of the image in the surrounding area near the pixel.
If an image has
Note that because of the definition given to a pixel, the coordinate
Pixel Coordinates
So the domain of a
Pixel Values
The value of a pixel depends on the precision and range of value needed. For example, high dynamic range (HDR) images store floating-point numbers, allowing a wide range of values. Low dynamic range (LDR) images are instead stored with integers. The following pixel-values are used in a variety of applications:
- 1-bit grayscale per pixel: Images where intermediate grays are not needed, e.g., text.
- 8-bit grayscale per pixel: Images with intermediate grays. It can store a total of 256 gray values, e.g., a grayscale photo.
- 8-bit red, green, and blue (RGB), 24-bits per pixel: Full-color images that allow near 16 million possible values, e.g., consumer photographs, web, and email applications.
- 12- to 14-bit RGB, 36-42 bits per pixel: Raw camera images for professional photography.
- 16-bit half-precision RGB, 48 bits per pixel: HDR images used in real-time rendering.
- 32-bit floating-point RGB, 96 bits per pixel: HDR images for software rendering.