1 of 28

Convolution, correlation, and Fourier transformation

Department of Data Communication Networks and Systems

Lecturer Shukhrat Palvanov

2 of 28

Introduction

Fundamental Operations in Signal Processing

Signal processing involves analyzing, modifying, and extracting information from signals (1D: audio, 2D: images).

Two key mathematical tools are convolution and correlation.

Both operations help in understanding how signals interact with systems or with other signals.

Why Convolution and Correlation are Important

Convolution: Models how a signal changes when it passes through a system (e.g., filtering noise, blurring/sharpening an image, applying an impulse response).

Correlation: Measures the similarity between two signals or patterns (e.g., detecting a known pattern inside a larger signal, template matching in images).

Widely applied in areas like communications, audio processing, computer vision, medical imaging, and machine learning.

3 of 28

Signals in Time and Space�

1D Signals (Time Domain)

Represented as a function of time: x(t) or x[n].

Examples:

    • Audio signals (speech, music)
    • Sensor outputs (temperature, ECG, seismic data)

2D Signals (Spatial Domain)

Represented as a function of two variables: f(x,y).

Examples:

    • Digital images (grayscale or color)
    • Medical scans (X-ray, MRI)
    • Satellite and radar images

Key Idea:

  • Convolution and correlation are applied to both 1D and 2D signals.
  • In 1D, they describe how signals interact.
  • In 2D, they describe how an image changes when a filter/kernel is applied.

4 of 28

What is Convolution?�

Definition: Convolution is a mathematical operation that combines two signals to form a third signal.

It describes how the shape of one signal is modified by another (usually a filter or system).

In signal processing, convolution is used to model the effect of an input signal passing through a linear time-invariant (LTI) system.

In image processing, convolution means applying a kernel (filter matrix) to an image to extract or modify features.

Key Concept: Flip → Shift → Multiply → Sum.

5 of 28

Convolution Formula (1D – Discrete)�

Key Points:

  • Summation is performed over all possible overlaps between the two signals.
  • Convolution gives the output of a linear time-invariant (LTI) system.
  • In practice, signals are often finite in length → summation is limited.

6 of 28

Convolution Formula (Continuous)

Key Points:

  • Integration is the continuous version of discrete summation.
  • Describes how continuous signals (e.g., analog audio, radio waves) interact with systems.
  • Used in physics, communications, and control systems.

7 of 28

Convolution Intuition�

Convolution can be thought of as a four-step process:

    • Flip one of the signals (usually the system response).
    • Shift it across the other signal.
    • Multiply the overlapping values.
    • Sum the results.

Intuitively, convolution measures the amount of overlap between two signals as one slides over the other.

In 1D: overlap of waveforms.

In 2D: overlap of image regions with a filter/kernel.

�Convolution shows how much one function “matches” another when shifted and combined.

8 of 28

Convolution Example (1D)

9 of 28

Common Kernels in Image Processing

10 of 28

Image Blurring

Blurring is achieved by averaging the values of neighboring pixels.

A smoothing (low-pass) filter reduces high-frequency components such as noise and sharp edges.

Kernel Example (3×3 Average Filter):

Effects of Blurring:

Removes random noise.

Reduces image details.

Useful as a preprocessing step before edge detection or compression.

Applications:

Noise reduction in images.

Background smoothing.

Computer vision preprocessing.

11 of 28

Edge Detection

Edge detection highlights regions in an image where intensity changes sharply.

Achieved using convolution with special kernels (high-pass filters).

Common Kernels:

Sobel Operator (Horizontal & Vertical): Detects edges in specific directions.

Prewitt Operator: Similar to Sobel but simpler.

Laplacian Filter: Detects edges regardless of orientation.

Effects of Edge Detection:

Identifies object boundaries.

Enhances structural details.

Forms the basis of many computer vision tasks (object recognition, segmentation).

Applications:

Medical imaging (detecting tumors, structures).

Self-driving cars (lane detection).

Facial recognition and object tracking.

12 of 28

Properties of Convolution

13 of 28

What is Correlation?�

Correlation is a mathematical operation that measures the similarity between two signals (or functions).

Unlike convolution, correlation does not flip the signal.

Mathematical Formula (Discrete):

Key Points:

Shows how much one signal resembles another at different shifts.

Often used to detect the presence of a known pattern in a larger signal.

In 2D (images), correlation is used for template or pattern matching.

�Correlation “slides” one signal over another and calculates the degree of similarity at each position.

14 of 28

Cross-Correlation�

Cross-correlation measures the similarity between two different signals as one is shifted over the other.

Mathematical Formula (Discrete):

Key Points:

High correlation value → signals are similar at that shift.

Low (or negative) correlation value → signals are dissimilar.

Used when comparing two different signals.

Applications:

Pattern recognition (detecting a known signal in noise).

Time delay estimation in communications.

Feature matching in computer vision.

15 of 28

Auto-Correlation�

Auto-correlation measures the similarity of a signal with itself at different time shifts (lags).

Mathematical Formula (Discrete):

Key Points:

Maximum value occurs at zero lag (n=0).

Symmetric function:

Useful to find repeating patterns and periodicity in signals.

Applications:

Detecting periodic signals (e.g., speech, ECG).

Signal energy and power analysis.

Identifying fundamental frequency in music and communications.

16 of 28

Correlation Example (1D)�

�Let two sequences be:

Step-by-Step Process:

Shift y[n] over x[n].

Multiply overlapping values.

Sum the products for each shift.

Result (Cross-Correlation):

Interpretation:

Peak value occurs where y[n] best aligns with x[n].

Shows the position where the two signals are most similar.

17 of 28

Correlation in 2D (Images)�

In 2D, correlation measures the similarity between an image and a smaller pattern (template) by sliding the template across the image.

Key Points:

Produces a correlation map showing similarity at each location.

High value = strong match between template and image region.

Unlike convolution, no flipping of the template is done.

Applications:

Template matching (e.g., face detection, object recognition).

Tracking moving objects in video.

Quality inspection in manufacturing (pattern alignment).

18 of 28

Advantages of Fourier Transform in Image Processing

  • Noise Reduction: Helps separate useful signal from unwanted noise in the frequency domain.
  • Compression: Used in JPEG and other formats for efficient image storage.
  • Filtering: Easy to apply low-pass, high-pass, and band-pass filters.
  • Feature Extraction: Identifies repeating patterns, edges, and textures.
  • Mathematical Simplicity: Complex image operations become algebraic in frequency space.

19 of 28

What is Fourier Transform (FT)?�

A powerful mathematical tool that converts a signal or image from the spatial (time/space) domain into the frequency domain.

Instead of analyzing the values of pixels directly, FT focuses on how often intensity values change.

Basic Idea

  • Any complex signal or image can be expressed as a sum of simple sinusoidal components (sines and cosines).
  • Low frequencies correspond to smooth variations (background, illumination).
  • High frequencies correspond to rapid changes (edges, textures, noise).

20 of 28

Importance of FT in Image Processing�

  • Provides an alternative view of the image for analysis.
  • Makes filtering (blurring, sharpening, noise removal) easier and more effective.
  • Used in compression (JPEG), image enhancement, pattern recognition, and medical imaging.
  • Helps separate important information (edges, structures) from redundant details or noise.

21 of 28

Mathematical Background�Fourier Series vs Fourier Transform�

Fourier Series: Represents periodic signals as a sum of sinusoids.

Fourier Transform (FT): Extends the concept to non-periodic signals.

In image processing, signals (images) are generally non-periodic → FT is used.

22 of 28

2D Fourier Transform�

  • Images are 2D signals, so 2D Fourier Transform is used to analyze them.
  • Converts an image f(x,y) in spatial domain into its frequency representation F(u,v).

23 of 28

2D Fourier Transform

Interpretation

  • Low-frequency components → smooth variations (illumination, background).
  • High-frequency components → rapid changes (edges, noise, details).
  • Center of Fourier spectrum = low frequencies, edges = high frequencies.

Why Important?

  • Allows filtering in the frequency domain (e.g., removing noise, enhancing edges).
  • Provides a new perspective on image analysis.

24 of 28

Fourier Transform Properties

1. Linearity

FT of a sum = Sum of FTs

Useful for combining signals.

2. Shift Property

A shift in spatial domain → phase change in frequency domain.

Image translation does not affect magnitude spectrum.

3. Scaling (Dilation)

Enlarging an image in spatial domain shrinks its spectrum in frequency domain.

Compression in spatial domain expands the spectrum.

4. Convolution Theorem

Convolution in spatial domain = Multiplication in frequency domain.

Very useful for image filtering (blurring, sharpening).

5. Symmetry

For real-valued images, the Fourier spectrum is symmetric.

25 of 28

Frequency Representation of Images

Key Concept

An image can be expressed as a combination of low-frequency and high-frequency components.

Fourier Transform separates these components clearly.

Low Frequencies

Located near the center of Fourier spectrum.

Represent smooth intensity variations (background, lighting, gradual changes).

Carry the overall structure of the image.

High Frequencies

Located at the edges of the spectrum.

Represent rapid intensity changes (edges, fine details, noise).

Important for sharpness and texture.

26 of 28

Discrete Fourier Transform (DFT)

Why DFT?

  • Images are digital and consist of discrete pixels.
  • Continuous Fourier Transform cannot be applied directly.
  • Therefore, Discrete Fourier Transform (DFT) is used.

27 of 28

Visualization of Fourier Spectrum

Magnitude and Phase

  • Magnitude Spectrum: shows the strength of frequencies.
  • Phase Spectrum: carries positional information of structures.
  • Both are necessary for accurate image reconstruction.

Log Transformation

  • Raw Fourier spectrum has very high dynamic range.
  • Apply log transform to make low-intensity details visible.

28 of 28

Thank you