Skip to content
UoL CS Notes

Image Enhancement

ELEC319 Lectures

Gain-Offset Correction

This determines the contrast in an image. We may have to re-scale images in a video to ensure all images in a sequence have similar brightness and contrast.

This correction fixes two issues of image sensors:

  • Gain - A multiplicative error in the output.
  • Offset - An additive error in the output.

Scaling & Equalisation

Scaling and equalisation clips and distorts the raw image data to produce a more appealing image. This can reduce the information in the final image. The following methods can be used:

  • Histogram Equalisation - Aims to improve apparent contrast.
  • Rescales the intensities so that the intensity distribution is near uniform.

Intensity Transforms

Given an image histogram:

  • $r$ is the original grey level (between 0 and $L-1$).
  • $s$ is the transformed output grey level (also between 0 and $L-1$).

Contrast Stretching

This method is for enhancing images with little contrast.

Given that the detail is given between $r_a$ and $r_b$:

  • Reduce the dynamic range before and after the range $r_a$ to $r_b$.
  • Increase the contrast in the range $r_a$ to $r_b$ to fill the histogram.

    Intensity Level Slicing

    This method can be used to enhance features within an image.

Given that the detail is given between $r_a$ and $r_b$:

  • Set all pixels in the range to a fixed (brighter) value.

Bit-Plane Slicing

Bit plane slicing is used to separate out useful information within an image:

  • In an $n$-bit image, each pixel has $n$ bits and there are $n$ planes.
  • The MSB contains the majority of the visually significant data.
  • The LSB is essentially noise.

Histogram Stretching

For an ideal image, the image histogram is flat. We can perform histogram stretching to spread a peak to fill the histogram:

  • Assume that a histogram of a low contrast image ranges from grey value $\check g$ to $\hat g$.
  • Assume that we wish to spread this to $[0,G-1]$.
    • where $G-1>\hat g-\check g$.

We can do this transform with the following function:

\[g'=\left\lfloor\frac{g-\check g}{\hat g-\check g}G+\frac12\right\rfloor\]

This simple method only stretches the whole histogram. The process of flattening an image histogram is called histogram equalisation.