Spatial and Frequency Domain — Image Processing

Anshul Sachdev
VITHelper
Published in
3 min readOct 2, 2019

Spatial Domain-

An image can be represented in the form of a 2D matrix where each element of the matrix represents pixel intensity. This state of 2D matrices that depict the intensity distribution of an image is called Spatial Domain. It can be represented as shown below-

Illustration of Spatial Domain

For the RGB image, the spatial domain is represented as a 3D vector of 2D matrices. Each 2D matrix contains the intensities for a single color as shown below-

Spatial domain for color image(RGB)

Each pixel intensity is represented as I(x,y) where x,y is the co-ordinate of the pixel in the 2D matrix. Different operations are carried out in this value. For example- operation T(say, addition of 5 to all the pixel) is carried out in I(x,y) which means that each pixel value is increased by 5. This can be written as-

I’(x,y) = T[I(x,y)]

where, I’(x,y) is the new intensity after adding 5 to I(x,y).

Frequency Domain-

In frequency-domain methods are based on Fourier Transform of an image. Roughly, the term frequency in an image tells about the rate of change of pixel values.

Below diagram depicts the conversion of image from spatial domain to frequency domain using Fourier Transformation-

Source: www.cs.unm.edu

Question- Why we need a domain other than spatial domain ?

Answer- Many times, image processing tasks are best performed in a domain other than the spatial domain. Moreover, it is easy to detect some features in a particular domain,i.e., a new information can be obtained in other domains.

Image Transformation mainly follows three steps-

Step-1. Transform the image.

Step-2. Carry the task(s) in the transformed domain.

Step-3. Apply inverse transform to return to the spatial domain.

The bottom line

A brief explanation of this topic is very well given by Athitya Kumar, “In digital Image processing, each image is either a 2D-matrix (as in case of gray-scale images) or a 3D vector of 2D matrices (as in case of RGB color images). These matrices are a measurement of intensity of gray-scale / red-component / green-component / blue-component etc. This state of 2D matrices that depict the intensity is called Spatial Domain.

Another domain, called Frequency Domain exists. This is obtained by applying a Fourier Transformation on an image that is currently in Spatial Domain.”

In the comment section: What do you think about all of this? Are you excited about Image Processing, pissed, or somewhere in between?

Call to action: Do follow me to read more on Image Processing and other tech-related blogs.

--

--