Image Processing and Computer Vision
18 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the final Huffman representation for a DC coefficient of -7?

100 000

What is the final Huffman representation for an AC coefficient of [(0,3),-8]?

100 0111

What special Huffman code is defined for cases when there are more than 15 zeros before a non-zero AC component?

(15,0)(0)

What is the purpose of Fourier transform?

<p>All of the above</p> Signup and view all the answers

The amplitude in Fourier transform represents signal strength.

<p>True</p> Signup and view all the answers

In the discrete version of Fourier transform, we sample __ samples from the signal being transformed.

<p>N</p> Signup and view all the answers

Why is JPEG based on DCT and not DFT?

<p>DCT have more of its energy concentrated in a small number of coefficients</p> Signup and view all the answers

What is the efficient version of DFT called?

<p>FFT</p> Signup and view all the answers

Low pass filter in the frequency domain is used for ______ the image.

<p>smoothing</p> Signup and view all the answers

High pass filter in the frequency domain preserves low frequency components.

<p>False</p> Signup and view all the answers

What type of filter is the ideal low pass filter?

<p>ideal low pass filter</p> Signup and view all the answers

What does JPEG stand for?

<p>Joint Photographic Experts Group</p> Signup and view all the answers

Why is it important to compress images and videos?

<p>To reduce memory space requirements</p> Signup and view all the answers

In JPEG images, images are converted from RGB to YCbCr color space before proceeding to the subsequent steps to separate achromatic (Y) and chromatic channels (Cb and Cr). This separation process is known as chroma ________.

<p>subsampling</p> Signup and view all the answers

What does DCT stand for in the context of JPEG compression?

<p>Discrete Cosine Transform</p> Signup and view all the answers

Quantization in JPEG compression aims to eliminate high frequency components to reduce the amount of information.

<p>True</p> Signup and view all the answers

What step follows quantization in the JPEG compression process?

<p>Zig-Zag ordering</p> Signup and view all the answers

What is the purpose of Huffman encoding in JPEG compression?

<p>To reduce the bit representation of frequent patterns</p> Signup and view all the answers

Study Notes

Image Compression using JPEG

  • JPEG (Joint Photographic Experts Group) is a standard for compressing image files.
  • The main goal of compression is to reduce the file size, which is proportional to the storage requirement.

Color Space Conversion

  • In JPEG images, RGB (Red, Green, Blue) is converted to YCbCr (Luminance and Chrominance) color space.
  • This is because humans are more sensitive to brightness than color differences.
  • The chroma (color) channels are subsampled to reduce the amount of data allocated to the image.

DCT (Discrete Cosine Transform)

  • DCT is used to express the image as a linear combination of basis functions.
  • The first step in DCT is to split the image into 8x8 blocks.
  • DCT coefficients are generated using a sample code.
  • The zigzag scan is used to map the 8x8 matrix to a 1x64 vector.

Quantization

  • Quantization reduces the precision of the DCT coefficients.
  • The JPEG algorithm uses a quantization matrix to eliminate high-frequency components.

DCT Coefficients Encoding

  • AC (Alternating Current) coefficients are encoded using run-length encoding and Huffman coding.
  • DC (Direct Current) coefficients are encoded using Huffman coding.
  • Huffman coding represents frequent patterns with low-bit codes and less frequent patterns with high-bit codes.

Decoding

  • Decoding involves inverse quantization, inverse DCT, and color space conversion back to RGB.

Compression Ratio and Artifacts

  • Compression ratio is the ratio of the original image size to the compressed image size.
  • Artifacts (distortions) appear after lossy compression and are proportional to the compression ratio and inversely proportional to image quality.

Fourier Transform

  • Fourier transform expresses a signal as a weighted sum of sinusoids.
  • It transforms a signal from the time domain to the frequency domain.

1D Fourier Transform

  • The discrete Fourier transform is given by X(k) = Σx(i) * e^(-j2πki/N)
  • X(k) is a complex number that encodes information about amplitude and phase.

2D Discrete Fourier Transform (2D DFT)

  • The 2D DFT is used for image processing and is given by X(k, L) = Σx(i, j) * e^(-j2π(ki/M + Lj/N))### Fourier Transform
  • 2D discrete Fourier transform (2D DFT) is used for image reconstruction.
  • Top-left coefficients in 2D DFT represent low-frequency components containing information on the general shape of the image.
  • Low-frequency components retain a high percentage of the signal energy, resulting in larger amplitude compared to high-frequency components.

Image Reconstruction using 2D DFT

  • Considering top-left coefficients (low-frequency components) yields better reconstruction results.
  • Considering bottom-right coefficients (high-frequency components) yields minor reconstruction results.

Calculating Amplitude and Phase

  • 𝑋𝑑 is a complex number encoding amplitude and phase information of a complex sinusoidal component.
  • Amplitude (𝐴𝑚𝑝) and Phase (𝑃ℎ) are calculated using 𝑅𝑒(𝑋𝑑) and 𝐼𝑚(𝑋𝑑).

Normalization and Visualization

  • Original image phase information does not provide significant information.
  • Amplitude image is mostly black due to out-of-range values.
  • Normalization is done using 𝒇 𝒙, 𝒚 = 𝒍𝒐𝒈(𝟏 + 𝑨𝒎𝒑 𝒙, 𝒚) to improve visualization.
  • Low-frequency components are shifted to the center for better visualization.

Comparison with DCT

  • JPEG uses DCT (Discrete Cosine Transform) instead of DFT because DCT concentrates energy in a small number of coefficients.
  • Fast Fourier Transform (FFT) is an efficient version of DFT.

Low and High Pass Filters

  • Low pass filter in the frequency domain is used for smoothing the image by attenuating high-frequency components.
  • Ideal low pass filter is designed using a cut-off frequency C and applied element-wise to the transformed image.

Designing Ideal Low Pass Filter

  • Filter H(u, v) is designed to exclude values greater than C, where C is the cut-off frequency.
  • Distance 𝑫(𝒖, 𝒗) = 𝒖² + 𝒗² is used to determine the filter values.

High Pass Filter

  • High pass filter in the frequency domain is used for detecting edges of the image by attenuating low-frequency components.
  • Ideal high pass filter is the inverse of the ideal low pass filter.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Description

Learn about image compression using JPEG and its benefits in reducing file size and storage requirements.

More Like This

Image Compression and JPEG
18 questions

Image Compression and JPEG

RomanticRisingAction avatar
RomanticRisingAction
JPEG Image Compression: DCT Transform
10 questions
Data Compression and JPEG XL Overview
16 questions
Use Quizgecko on...
Browser
Browser