Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Digital Image Processing

Basics

Dr. Surya Prakash


surya@iiti.ac.in

CS419/619: Computer Vision


Digital Image Processing
 Digital Image processing
– concerned with taking
• Image (one array of pixels) as input and
• producing another image (array of pixels) as output
– This transformation in some way represents
an improvement to the original image

Image Processing
Transformation

Input output
2 CS419/619: Computer Vision
Digital Image Processing
 Improvement of Pictorial Information
– improve the contrast of the image

– remove noise

3 CS419/619: Computer Vision


Digital Image Processing
 Improvement of Pictorial Information …contd
– remove blurring caused by movement of the camera
during image acquisition

– correction of geometrical distortions caused by the lens

4 CS419/619: Computer Vision


Digital Image-representation
 How do we store an image in computer?

Intensity or
colour of each tiny
square can be
stored in an array

2D array for


grayscale images

3D array for


colour images

5 CS419/619: Computer Vision


Digital Image-representation

Magnified view

 A digital image is a 2-D array of intensity values, say f(x, y)


 f(x,y) represents 2-D intensity function discretized
– in spatial coordinates (spatial sampling) and
– brightness (quantization) values. An Image represented in the
form of a 2-D grid

6 CS419/619: Computer Vision


Pixel
 Pixels:
– The elements of such an array (2-D grid) are
called pixels (picture elements)
– Smallest unit of an image
 Storage Requirement of an Image:
– The storage requirement for an image depends on
the
• Spatial resolution (image rows, columns) and
• Number of bits necessary for pixel quantization

7 CS419/619: Computer Vision


Gray Levels in an Image
 A digital Image is an array of integers:
– f(x,y) ∈ {0,1,….,Imax-1},
– x, y ∈ {0,1,…..,N-1}
 N is the resolution of the image and Imax is the
level of discretized brightness value
 Note:
– Larger the value of N, more is the clarity of the
picture (larger resolution), but more data to be
analyzed in the image

8 CS419/619: Computer Vision


Digital Image - Storage Size
 Gray-level Image
– If the image is a gray-level (8-bit per pixel)
image, then it requires N2 Bytes for storage

 Color Image
– If the image is a color image – RGB
representation, each pixel requires 3 Bytes of
storage space.
– Hence color image of size N × N would be 3N2
bytes

9 CS419/619: Computer Vision


Digital Image - Storage Size

Storage space Storage space


Image Size needed for needed for color
grayscale image image
64 x 64 4 KB 12 KB
256 x 256 64 KB 192 KB
512 x 512 256 KB 768 KB

10 CS419/619: Computer Vision


Levels in Image Processing
 Three main categories of Task in CV
– There are generally three main categories of
tasks involved in a complete computer vision
system.

Image processing
 They are:
– Low level processing
– Intermediate level processing
– High level processing

Computer Vision

11 CS419/619: Computer Vision


Levels of Image Processing
 Low level processing:
– Involves image processing tasks in which the quality of the
image is improved
– This improvement benefits the human observers and higher
level routines to perform better

Enhanced
Input Image
Image

12 CS419/619: Computer Vision


Low Level Processing – Example

Input Image Enhanced Image

13 CS419/619: Computer Vision


Levels of Image Processing
 Intermediate level processing:
– Involves the processes of feature extraction and
pattern detection tasks.
– The algorithms used here are chosen and tuned in
a manner as may be required to assist the final
tasks of high level vision.

14 CS419/619: Computer Vision


Intermediate Level Vision – Example

 Feature Extraction
– Ridge ending
– Ridge bifurcation

Enhanced Image

15 CS419/619: Computer Vision


Levels of Image Processing
 High level vision:
– Involves autonomous interpretation of scenes for
• pattern classification
• recognition and
• identification of objects in the scenes
• any other information required for human
understanding
– A top down approach, rather than a bottom-up
approach, is used in the design of these systems
in many applications
• Top down – general to specific
• Bottom up – specific to general

16 CS419/619: Computer Vision


High level vision – Example

Minutia points defined as Line shows the matching minutiae points between
[(x, y,), type ] two fingerprints

17 CS419/619: Computer Vision


4 Important High-level DIP Tasks
 There exists four broad categories of
tasks in digital image processing:
– Segmentation
– Recognition
– Compression
– Motion analysis

18 CS419/619: Computer Vision


Segmentation

Examples
19 CS419/619: Computer Vision
Segmentation
 It deals with the process of fragmenting the
image into homogeneous meaningful parts,
regions or sub-images
 Techniques used for segmentation
– generally based on the analysis of the histogram
of images using gray level values as features.
– Other features used for segmentation are
• edges or lines,
• colors and
• textures.

20 CS419/619: Computer Vision


Recognition
 It deals with identification
or classification of objects
in an image for the purpose
of interpretation or
identification

Recognition of various
objects present in the
scene

21 CS419/619: Computer Vision


Object Recognition Approaches
 Recognition is based on models, which
represent an object

 A system is trained (using HMM, GMM, ANN etc.) to


learn or store the models, based on training samples
– HMM: Hidden Morkov Model
– GMM: Gaussian Mixture Model
– ANN: Artificial Neural Network

 The test data is matched with all such models to


identify the object with a certain measure of
confidence

22 CS419/619: Computer Vision


Compression
 It involves methodologies for efficient storage and
retrieval of image data, which occupies large disk
space
 Image compression may be
– Lossy or
– lossless
 Lossless compression is preferred where every
bit is important
– for archival purposes
– medical applications
– technical drawings

23 CS419/619: Computer Vision


Compression
 Lossy compression methods:
– Used especially when low bit rates required
– introduces compression artifacts
– suitable for natural images such as photographs in
applications where minor (sometimes
imperceptible) loss of fidelity is acceptable to
achieve a substantial reduction in bit rate
 Note:
– The lossy compression that produces
imperceptible differences may be called visually
lossless

24 CS419/619: Computer Vision


Compression
 Typical methods of image compression are:
• Run length coding (Lossless)
• Huffman Coding (Lossless)
• Discrete Cosine Transform (DCT) based (Lossy)
– Used in JPEG compression
• Wavelet based (Lossy)
 Typical methods of video compression are:
• MPEG-I, II, IV & VII
• H.264 or MPEG-4 Part 10, Advanced Video
Coding (MPEG-4 AVC)
– It is a block-oriented motion-compensation-based video
compression standard

25 CS419/619: Computer Vision


Motion Analysis
 Also known as dynamic scene analysis

 It involves tracking and estimation of the


path of movement of object/s from a
sequence of frames
 Typical methods for motion analysis use
• Optical flow
• Kalman filter
• Mean-shift tracking (Kernel-based tracking)
• Kanade–Lucas–Tomasi (KLT) feature tracker
26 CS419/619: Computer Vision
Motion Analysis
 Motion analysis is based on
– (i) tracking
– (ii) obtaining correspondence between
frames and

 And then
– (iii) estimating the motion parameters and
– (iv) structure of moving objects

27 CS419/619: Computer Vision


End

28 CS419/619: Computer Vision

You might also like