3. Digital Images

Reading Assignment

Please read chapter 2 of [PIVP]. We will also review some introductory material from chapter 12 of [RVC].

Video Resources

The slides from the authors will serve as our primary notes.

3.1. Summary

An image is a 2-D array of pixels (picture elements).

The pixel values are also called intensity.

An image may be also be described as a 2-D function.

Resolution

The number of rows and columns in a picture. Often noted as columns X rows (width X height); but in MATLAB it is rows X columns, which is how the size of an array is described.

Axis system (u - column number, v - row number)

Origin in Center some algorithms need point (0, 0) in the center of the image. Positive u to right and positive v up.

Upper Left unless an algorithm requires the origin in the center, it is often in the upper left. In the literature, the origin is usually (0, 0), but in MATLAB it is (1, 1). MATLAB array indexes go from 1 to N.

Color or Gray scale

Gray scale (monochrome) images have a single value for each pixel. Many algorithms for feature extraction can only use one value for each pixel. In image processing, we often try to get to a gray scale image containing only the relevant information needed.

Color picture contain three gray scale images – one each for red, green, and blue.

Logical (binary or black-and-white) images are a logical true (1) or false (0) for each pixel. Because of the simplicity, they are often needed for feature extraction. Algorithms such as segmentation produce logical images.

Pixel data

uint8 8-bit unsigned integer. 0 is black, 255 is white. Most image files contain uint8 data.

unit16 16-bit unsigned integer – less common.

double 64-bit double floating point numbers. 0 is black, 1 is white. The MATLAB casting function double() can convert unit8 data to double, but don’t use it because the range will be 0 to 255, which is not expected by image processing algorithms. The IPT and MVTB have utilities that convert images to double.

Neighborhood
  • 4-neighborhood
  • 8-neighborhood