The Deep Learning Workshop
上QQ阅读APP看书,第一时间看更新

Digital Images

Humans can see through their eyes by transforming light into electrical signals that are then processed by the brain. But computers do not have physical eyes to capture light. They can only process information in digital forms composed of bits (0 or 1). So, to be able to “see", computers require a digitized version of an image.

A digital image is formed by a two-dimensional matrix of pixels. For a grayscale image, each of these pixels can take a value between 0 and 255 that represents its intensity or level of gray. A digital image can be composed of one channel for a black and white image or three channels (red, blue, and green) for a color image:

Figure 3.2: Digital representation of an image

A digital image is characterized by its dimensions (height, width, and channel):

  • Height: How many pixels there are on the vertical axis.
  • Width: How many pixels there are on the horizontal axis.
  • Channel: How many channels there are. If there is only one channel, an image will be in grayscale. If there are three channels, the image will be colored.

The following digital image has dimensions (512, 512, 3).

Figure 3.3: Dimensions of a digital image