Hands-On Image Processing with Python
上QQ阅读APP看书,第一时间看更新

Image types (modes)

An image can be of the following different types:

  • Single channel imageseach pixel is represented by a single value:
    • Binary (monochrome) images (each pixel is represented by a single 0-1 bit)
    • Gray-level images (each pixel can be represented with 8-bits and can have values typically in the range of 0-255)
  • Multi-channel imageseach pixel is represented by a tuple of values:
    • 3-channel images; for example, the following:
      •  RGB images—each pixel is represented by three-tuple (r, g, b) values, representing red, green, and blue channel color values for every pixel.
      • HSV imageseach pixel is represented by three-tuple (h, s, v) values, representing hue (color), saturation (colorfulness—how much the color is mixed with white), and value (brightness—how much the color is mixed with black) channel color values for every pixelThe HSV model describes colors in a similar manner to how the human eye tends to perceive colors. 
    • Four-channel images; for example, RGBA imageseach pixel is represented by three-tuple (r, g, b, α) values, the last channel representing the transparency.