4 Image Processing And Analysis

Multimedia Computing · Unit 4

Image Processing and Analysis

Exam-focused notes for Image Processing and Analysis (Multimedia Computing, BIT356): what the TU syllabus asks and how it has actually been tested, with 4 solved past questions from this unit.

Image Processing and Analysis in short

Images and animation are the visual part of multimedia. This chapter explains image types and storage, how images are analysed and recognised, how colours are reduced by dithering, and how animation is made.

Image Processing and Analysis: notes

Image formats and types

A digital image is a grid of small dots called pixels. Each pixel stores a colour as a number.

By how they are built, images are of two types:

  • Bitmap (raster) images store every pixel. They suit photos but lose quality when enlarged.
  • Vector images store shapes as lines, curves and formulas. They stay sharp at any size and suit logos and diagrams.

By colour depth:

  • Binary (1 bit): black and white.
  • Grayscale (8 bit): 256 shades of gray.
  • Indexed colour (8 bit): 256 colours chosen from a palette.
  • True colour (24 bit): 8 bits each for red, green and blue, giving $2^{24} = 16{,}777{,}216$ colours.

Common formats:

FormatCompressionFeatures
BMPNone (usually)Simple, very large files
GIFLossless (LZW)Up to 256 colours, supports animation
PNGLosslessTrue colour, transparency, no animation in the basic format
JPEGLossyBest for photographs, small files, no transparency
TIFFLossless or noneUsed for printing and scanning

Image storage methods

An uncompressed image needs this many bytes:

$$\text{Size} = \frac{\text{width} \times \text{height} \times \text{bits per pixel}}{8}$$

Example 1. A 640 x 480 true colour image.

$$\begin{aligned} \text{Size} &= \frac{640 \times 480 \times 24}{8} \ &= 921{,}600 \text{ bytes} \end{aligned}$$

Example 2. A 1024 x 768 image with 8 bits per pixel needs $1024 \times 768 = 786{,}432$ bytes.

Doubling both width and height makes the file four times bigger. This is why images are usually stored compressed.

Storage can be:

  • Raw pixel storage, as in BMP.
  • Compressed storage, using lossless (PNG, GIF) or lossy (JPEG) methods.
  • Palette storage, where each pixel holds an index into a colour table. This cuts the size to about one third of true colour.

What this unit covers

  • Image formats and types
  • Image storage methods
  • Image analysis techniques
  • Dithering process
  • Image recognition steps
  • Animation in images
  • Computer based animation steps
  • Timeline based animation
  • Frame based animation

Dithering process

2081 · 10 marks

What is dithering? How image analysis is done? Describe the steps of image recognition.[10]

Show solved answer

Model Answer: Dithering, Image Analysis, and Image Recognition

1. What is Dithering?

Dithering is a technique used in image processing to reduce the number of colors in an image while maintaining the visual quality and appearance of the original image.

Key characteristics:

  • It is applied when converting images from higher color depth to lower color depth (e.g., 24-bit to 8-bit color)
  • Uses spatial patterns or noise to create the illusion of colors that are not actually present in the reduced palette
  • Distributes quantization error across neighboring pixels to minimize banding artifacts
  • Common methods include:
    • Ordered dithering - uses predefined patterns
    • Error diffusion dithering - distributes quantization error to adjacent pixels (Floyd-Steinberg algorithm)

Purpose: Maintains perceived image quality despite color reduction, preventing posterization effects.


2. How Image Analysis is Done

Image analysis involves examining and extracting meaningful information from digital images through systematic processing:

Main steps:

  1. Image Acquisition - Capture or input the image using cameras or scanners
  2. Preprocessing - Enhance image quality (noise reduction, contrast adjustment, filtering)
  3. Segmentation - Divide image into meaningful regions or objects
  4. Feature Extraction - Identify and extract relevant characteristics (edges, textures, shapes, colors)
  5. Classification/Interpretation - Categorize or analyze extracted features
  6. Output/Visualization - Present results and findings

3. Steps of Image Recognition

Image recognition is the process of identifying and classifying objects, patterns, or scenes within digital images:

Step 1: Image Acquisition

  • Obtain the input image from camera, file, or sensor

Step 2: Preprocessing

  • Resize image to standard dimensions
  • Normalize pixel values
  • Apply filters to reduce noise
  • Enhance contrast and brightness

Step 3: Feature Extraction

  • Extract distinctive features (edges, corners, textures, color histograms)
  • Use techniques like SIFT, SURF, or HOG (Histogram of Oriented Gradients)
  • Convert image to feature vector representation

Step 4: Model Training (if using machine learning)

  • Train classifier on labeled dataset
  • Learn patterns and decision boundaries

Step 5: Classification/Recognition

  • Compare extracted features against trained model or database
  • Use algorithms like neural networks, SVM, or template matching
  • Assign class label or identify object

Step 6: Post-processing

  • Apply confidence thresholding
  • Refine results using context information

Step 7: Output

  • Display recognized object/class with confidence score
  • Generate report or take action based on recognition result

Note: This answer is based on standard image processing principles. Reference notes were not provided for this topic.

Open this answer on its own page →

Computer based animation steps

2081 · 5 marks

Describe the steps of computer based animation. [5]

Computer-based animation involves a systematic process to create moving images. The main steps are: - Define the animation concept, story, and objectives - Create storyboards showing key scenes and sequences - Determine the style, tone, and visual direction - Plan the duration and frame rate of t...

Open this answer on its own page →

Timeline based animation

2081 · 5 marks

Differentiate between Timeline and frame based animation. [5]

Definition: Timeline-based animation uses a continuous timeline where animations are defined by keyframes placed at specific points in time. The animation progresses smoothly along this timeline. Key Characteristics: - Animations are controlled by time values (measured in seconds or milliseconds)...

Open this answer on its own page →

Image formats and types

0 · 10 marks

Describe image formats. How they are stored? How animation in done?[10]

Image formats are standardized ways of encoding and storing visual data. Common formats include: Raster (Bitmap) Formats: - BMP (Bitmap): Uncompressed format storing pixel data directly; large file sizes - JPEG (Joint Photographic Experts Group): Lossy compression format; ideal for photographs; r...

Open this answer on its own page →