Skip to main content

unit 2 - Image quantization and Image Transforms

1. Sampling Theorem

 Definition:

The Sampling Theorem (Shannon-Nyquist) states that a continuous signal can be perfectly reconstructed from its samples if it is sampled at twice the maximum frequency present in the signal.

 Formula:

fs2fmaxf_s \geq 2f_{max}

where:

  • fsf_s = sampling frequency

  • fmaxf_{max} = highest frequency component in the signal

 Application:

Used in digitizing analog images to ensure no information is lost during sampling.


2. Anti-Aliasing

Aliasing:

Occurs when sampling is done below the Nyquist rate, leading to overlapping frequency components and distortion.

Anti-Aliasing:

A process to suppress high frequencies before sampling using low-pass filters to prevent aliasing.


3. Image Quantization

 Definition:

Process of mapping a range of continuous pixel values to a finite number of levels.

 Types:

  • Scalar Quantization: Each pixel is quantized independently.

  • Vector Quantization: Blocks of pixels are quantized together.

Quantization Error:

Error=Original PixelQuantized Pixel\text{Error} = \text{Original Pixel} - \text{Quantized Pixel}

Too few levels → loss of detail, visible banding.


4. Orthogonal and Unitary Transforms

 Orthogonal Transform:

A linear transformation using an orthogonal matrix TT where:

TTT=IT^T T = I

  • Preserves energy.

  • Examples: DFT, DCT, Haar, Hadamard.

 Unitary Transform:

A generalization using complex numbers:

THT=IT^H T = I

where THT^H is the conjugate transpose.


5. Discrete Fourier Transform (DFT)

Formula:

F(u,v)=xyf(x,y)ej2π(uxM+vyN)F(u,v) = \sum_x \sum_y f(x,y) \cdot e^{-j2\pi \left(\frac{ux}{M} + \frac{vy}{N}\right)}

  • Converts spatial image to frequency domain.

  • Captures periodic patterns.

  • Used in filtering, compression.


6. Discrete Cosine Transform (DCT)

Formula (1D):

Xk=n=0N1xncos[πN(n+0.5)k]X_k = \sum_{n=0}^{N-1} x_n \cdot \cos\left[\frac{\pi}{N}(n + 0.5)k\right]

  • Like DFT, but uses only real cosine terms.

  • Energy compaction is high → used in JPEG compression.


7. Hadamard Transform

 Properties:

  • Uses only +1 and −1 (binary values).

  • Fast to compute (no multiplications).

  • Not based on sinusoidal functions.

 Matrix:

Hadamard matrix is recursively defined:

H2=[1111],H2n=[H2n1H2n1H2n1H2n1]H_2 = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}, \quad H_{2^n} = \begin{bmatrix} H_{2^{n-1}} & H_{2^{n-1}} \\ H_{2^{n-1}} & -H_{2^{n-1}} \end{bmatrix}


8. Haar Transform

 Properties:

  • Simplest wavelet transform.

  • Breaks signal into approximation and detail parts.

  • Useful for multi-resolution analysis.

 Steps:

  • Divide signal into pairs.

  • Calculate average and difference.

  • Recurse on averages.


9. Karhunen-Loeve Transform (KLT / PCA)

 Definition:

A statistical transform that decorrelates data. Also known as Principal Component Analysis (PCA).

 Steps:

  1. Calculate covariance matrix.

  2. Compute eigenvalues and eigenvectors.

  3. Transform data using eigenvectors.

 Advantage:

  • Optimal energy compaction.

  • Basis vectors are data-dependent.

  • Used in face recognition, compression.

Comments

Popular posts from this blog

Raster scan Vs Vector Scan

1. Raster Scan Display   How It Works : A raster scan display works by painting an image on the screen pixel by pixel, row by row. It follows a systematic pattern where the electron beam (in CRT monitors) or the display elements (in modern LCD/LED screens) sweep across the screen from left to right, top to bottom, in a series of horizontal lines (scan lines). This process is akin to how a traditional TV screen works.   Process : The display draws the image starting from the top-left corner, moving to the right, then moves to the next row below, and repeats this process until the entire screen is filled. This pattern creates a grid of pixels, where each pixel can have a color and brightness level.   Characteristics : Pixel-based : The screen consists of a grid of pixels, and each pixel can have a distinct color and intensity. Continuous Image : Raster scan displays are capable of displaying detailed and complex images, including photographs and videos, because they break t...

Inheritance

*■ Inheritance*  • Inheritance is a concept in OOP that allows a class to inherit properties and behaviors (methods) from another class. • A class that inherits from another class is called a derived class (or subclass) • The class which gets inherited by another class is called the base class (or superclass). • Inheritance is possible only if there is is-a relationship between parent and child class. • constructors are not inherited in derived class, however the derived class can call default constructor implicitly and if there's a parameterised constructors in bass class then derived class can call it using 'base' keyword.  ____________________________________________  *➤ Rules of Inheritance*  1) C# supports single inheritance, meaning a class can inherit from only one base class. 2) A parent class constructor must be accessible in child class otherwise  inheritance will be not possible. 3) every class, whether user-defined or predefined implicitly derives fr...

unit -1 Introduction of Image processing

  What is Image Processing? Image processing is a method to perform operations on an image to enhance it or extract useful information. It is a type of signal processing where the input is an image, and the output may be either an image or characteristics/features associated with that image. Goals of Image Processing Image Enhancement : Improving visual appearance (e.g., contrast, sharpness) Image Restoration : Removing noise or distortion Image Compression : Reducing the amount of data required to represent an image Feature Extraction : Identifying objects, edges, or patterns Image Analysis : Understanding and interpreting image content Object Recognition : Detecting and identifying objects in an image What is an Image? An image is a two-dimensional function f(x, y) , where x and y are spatial coordinates, and f is the intensity (brightness or color) at that point. For digital images, both x, y, and f are finite and discrete. Types of Image Representation...