Chapter 1 Introduction To Image Processing
Chapter 1 Introduction To Image Processing
Introduction to Image
Processing
2
of
77
What is Image Processing?
Image:
An image may be defined as a two dimensional function, f(x,y),
where x and y are spatial (plane) coordinates, and the amplitude of f
at any pair of coordinates (x,y) is called the intensity, or gray level
of the image at that point. When (x,y) and f are all finite and discrete
quantities, we call the image a digital image.
The low level processes involves those operations whose inputs are images
and whose outputs are also images. For example, image enhancement
operations such as image negative and smoothing of an image fall in this
category. These operations are the mainstay (backbone) of the DIP.
The mid level processes are characterized by the fact that its inputs generally
are images, but its outputs are attributes extracted from these images, e.g.
edges, contours and the identity of individual objects.
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
14
of
Key Stages in Digital Image Processing:
77 Image Aquisition
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
15
of
Key Stages in Digital Image Processing:
77 Image Enhancement
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
16
of
Key Stages in Digital Image Processing:
77 Image Restoration
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
17
of
Key Stages in Digital Image Processing:
77 Morphological Processing
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Color Image Image
Processing Compression
18
of
Key Stages in Digital Image Processing:
77 Segmentation
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
19
of
Key Stages in Digital Image Processing:
77 Object Recognition
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
20
of
Key Stages in Digital Image Processing:
77 Representation & Description
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
21
of
Key Stages in Digital Image Processing:
77 Image Compression
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Color Image Image
Processing Compression
22
of
Key Stages in Digital Image Processing:
77 Colour Image Processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Color Image Image
Processing Compression
23
of
Components of an
77 Image Processing System
An image processing system consists of a set of hardware
devices and software components. The major components are:
Two other units for spatial resolution depending upon the number of
pixels per unit length: dots per inch (dpi) and pixels per inch (ppi).
Formula for computing the PPI of a mobile device or any screen
where
is the size of the screen (diagonally)
is the maximum resolution supported by the screen.
30
of
77
Spatial Resolution
Bit depth: The number of bits required to store a pixel of an image.
of
77
31
Spatial Resolution (cont…)
32
of
77 Typical effects of
reducing spatial
resolution.
Images shown at
(a) 1250 ppi,
(b) 300 ppi,
(c) 150 ppi and
(d) 72 ppi
33
of
77
Intensity Level Resolution
Intensity level resolution refers to the
number of intensity levels used to represent
the image
– The more intensity levels used, the finer the level of
detail in an image
– Intensity level resolution is usually given in terms of
the number of bits used to store each intensity level
Number of Intensity
Number of Bits Examples
Levels
1 2 0, 1
2 4 00, 01, 10, 11
4 16 0000, 0101, 1111
8 256 00110011, 01010101
16 65,536 1010101010101010
34
of
77
Intensity Level Resolution (cont…)
256 grey levels (8 bits per pixel) 128 grey levels (7 bpp) 64 grey levels (6 bpp) 32 grey levels (5 bpp)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
16 grey levels (4 bpp) 8 grey levels (3 bpp) 4 grey levels (2 bpp) 2 grey levels (1 bpp)
35
of
Some Basic Relationships
77
between Pixels
• A pixel at location has 8-neighbors comprise four neighbors
(horizontal and vertical) at the locations:
8-neighborhood of pixel
36
of
77
Adjacency
• Let V be the set of gray-level values used to define adjacency.
• In a binary image, if we are referring to adjacency of pixels with value 1.
• In a gray scale image, the idea is the same, but set typically contains
more elements. For example, in the adjacency of pixels with a range of
possible gray-level values 0 to 255, set could be any subset of these
256 values.
where
• m-Adjacency (Mixed Adjacency): Two pixels and with values from are
m-adjacent if
where , and pixels are adjacent for . In this case n is the length of the
path. If , then the path is a closed path. We can define 4-, 8-, or m-paths
depending upon the type of adjacency specified.
• Let S represent a subset of pixels in an image. Two pixels p and q are
said to be connected in S if there exists a path between them consisting
entirely of pixels in S.
• For any pixel p in S, the set of pixels that are connected to it in S is
called a connected component. If it is has only one connected
component, then set S is called a connected set.
40
of
77
Distance Measure
• For pixels p, q and z, with coordinates , D is a distance function or
metric if
For this distance measure, the pixels having a distance less than or
equal to some value from are the points contained in a disk of
radius , centered at
41
of
77
Distance Measure
2. The D4 distance (also called city-block distance) between p and q is
defined as:
In this case, the pixels with D4 distance from less than or equal to
some value form a diamond centered at . For example, the pixels with
from (the center point) form the following
2
2 1 2
2 1 0 1 2
2 1 2
2
In this case, the pixels with D8 distance from less than or equal to
some value form a square centered at . For example, the pixels with
from (the center point) form the following
2 2 2 2 2
2 1 1 1 2
2 1 0 1 2
2 1 1 1 2
2 2 2 2 2
Case 1: If ,
Case 2: If ,
44
of
77
Image Processing Operations
Divided into three categories
Point Processing Operations
Local Operations
Global Operations
45
of
77
Image Processing Operations
46
of
77
Arithmetic Operations
Arithmetic operations are point operations applied
between two images of equal size.
They include following operations:
Image Addition
Image Subtraction
Image Multiplication
Image Division
47
of
Arithmetic Operations:
77
Image Addition
The output image is formed by the addition of two input
images or addition of an image with some constant
OR
Applications
To increase the brightness of the image.
+𝟓𝟎=¿
+¿
Output Image
51
of
Arithmetic Operations:
77
Image Subtraction
The output image is formed by the subtraction of two input
images or subtraction of an image with some constant
OR
Applications
To decrease the brightness of the image.
Motion or Change Detection in video sequences.
52
of
Arithmetic Operations:
77 Image Subtraction
−𝟓𝟎=¿
F Frame 2
54
of
Arithmetic Operations:
77 Image Subtraction
Output Image
55
of
Arithmetic Operations:
77
Image Multiplication
The output image is formed by the point (or pair) wise
multiplication of two input images or multiplication of an
image with some constant
OR
Applications
To increase the contrast of the image.
It is useful for extracting the area of interest in an
image.
56
of
Arithmetic Operations:
77 Image Multiplication
×𝟐=¿
Output Image
59
of
Arithmetic Operations:
77
Image Division
The output image is formed by the point (or pair) wise
division of two input images or division of an image with
some constant
OR
Applications
To decrease the contrast of an image
60
of
Arithmetic Operations:
77 Image Division
¿ 𝟐=¿
Image 1 I
63
of
Arithmetic Operations:
77 Image or Alpha Blending
Blended Output
Image
64
of
Arithmetic Operations:
77 Image or Alpha Blending
Image 1 I
65
of
Arithmetic Operations:
77 Image or Alpha Blending
Blended Output
Image
66
of
77
Logical Operations
Arithmetic operations are point operations applied
between two images of equal size.
They include following operations:
OR/UNION
AND/INTERSECTION
NOT/COMPLEMENT
These operators are widely used in morphological
image processing such as image thinning and
thickening, boundary extraction, extraction of connected
components etc.
67
of
77
Logical Operations