An image can be abstracted as a function

I(x,y):RV

Where RR2 is a rectangular area and V is a set with the possible pixel values, the following are examples of the set V

  • V=R+ (non-negative reals) for grayscale images, each pixels represents only brightness and no color
  • V=(R+)3 (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 nx columns and ny rows a common convention is to count rows and columns from the bottom left, the bottom left pixel is (0,0) and the top-right is pixel (nx1,ny1)

Note that because of the definition gave to a pixel the coordinate (0,0) is mapped to the center of the pixel (0,0), therefore half-pixel will exist in both the x-axis and the y-axis

pixel coordinates

pixel coordinates

So the domain of a nx×ny image is

R=[0.5,nx0.5]×[0.5,ny0.5]

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