Image Processing and Computer Vision

AstonishedComplex avatar
AstonishedComplex
·
·
Download

Start Quiz

Study Flashcards

18 Questions

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?

All of the above

The amplitude in Fourier transform represents signal strength.

True

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

N

Why is JPEG based on DCT and not DFT?

DCT have more of its energy concentrated in a small number of coefficients

What is the efficient version of DFT called?

FFT

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

smoothing

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

False

What type of filter is the ideal low pass filter?

ideal low pass filter

What does JPEG stand for?

Joint Photographic Experts Group

Why is it important to compress images and videos?

To reduce memory space requirements

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 ________.

subsampling

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

Discrete Cosine Transform

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

True

What step follows quantization in the JPEG compression process?

Zig-Zag ordering

What is the purpose of Huffman encoding in JPEG compression?

To reduce the bit representation of frequent patterns

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.

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

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

The Ultimate JPEG File Format Quiz
10 questions
Imágenes JPEG: Una visión compresiva
5 questions
Image Compression and JPEG
18 questions

Image Compression and JPEG

RomanticRisingAction avatar
RomanticRisingAction
Use Quizgecko on...
Browser
Browser