Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views67 pages

Chapter 1 Introduction To Image Processing

Uploaded by

arunkumarshukla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views67 pages

Chapter 1 Introduction To Image Processing

Uploaded by

arunkumarshukla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 67

Chapter 1

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.

 Digital Image Processing (DIP):


It refers to the processing of digital image by means of a digital
computer.
3
of
Image Processing, Image Analysis
77 and Computer Vision
 Broadly image processing consists of three levels of processes: Low, Middle,
and High.

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

Mid level processing on images involves tasks such as:


 Segmentation (partitioning an image into regions or objects),
 Description of those objects (in terms of features extracted) to reduce them
to a form suitable for computer processing and
 Classification (recognition) of individual objects.
4
of
Image Processing, Image Analysis
77 and Computer Vision
 The higher level processing involves “making sense” of an ensembles (group)
of recognized objects and performing the cognitive functions normally
associated with vision.
 There is very little difference between DIP and Image Analysis and Computer
Vision.
 DIP covers both low and mid level processing till recognition of individual
regions or objects in the image.
 Image Analysis deals with the Knowledge extraction part out of an image (or
visual input) i.e., whether the recognized objects in the image makes any sense
or not (i.e. give any useful knowledge or not).
 Computer Vision then uses this knowledge to take decisions and make any
necessary actions.
 The ultimate goal of Computer Vision is to use computers to emulate human
vision, including learning and being able to make inferences and take actions
based on visual inputs.
5
of
Difference between Image Processing
77 and Computer Graphics
 Computer Graphics: Computer Graphics is a branch of
computer science that deals with the creation, modification and
manipulation of images with the help of a digital computer.

 The key element that distinguishes DIP from Computer Graphics


is that the Image Processing generally begins with images,
while the basic operation in Computer Graphics is to create
images. While each of these two fields has its own focus and
strength, they also overlap and complement each other.
6
of
77
Image Sampling And Quantization

 A digital image is always only an approximation of a


real world scene.
 Digitizing the coordinate values is called sampling.
 Digitizing the amplitude values is called quantization.
7
of
77
Image Sampling And Quantization
8
of
Fundamental Steps in
77
Digital Image Processing
All steps include the following
1. Image Acquisition
2. Image Filtering and Enhancement
3. Image Restoration
4. Color Image Processing
5. Wavelets and Multiresolution Processing
6. Image Compression
7. Morphological Processing
8. Image Segmentation
9. Image Representation and Description
10.Object Recognition
9
of
Fundamental Steps in
77
Digital Image Processing
1. Image Acquisition: This step pertains to the acquisition of an image
agreeable to process it digitally. Whatever be the process of acquiring an
image, it will finally be in a digital form which can be stored in a system in
the form of a file.
Note that acquisition of an image could be as simple as being an
image that is already in digital form.

2. Image Filtering and Enhancement: It is the simplest and the


most appealing area of digital image processing. It is process of
manipulating the image so that the result is more suitable than the
original one for a specific application.
The ideas behind enhancement techniques are to bring out
details that are obscured, or simply to highlight certain features of interest
of the image. For example: Increasing the contrast of an image.
The measure is “goodness” or “badness” depending upon the
psychophysical aspect of human visual system.
10
of
Fundamental Steps in
77
Digital Image Processing
3. Image Restoration: This also deals with improving the appearance
of an image. However, unlike enhancement, which is subjective
(depends upon perception of an individual), image restoration is
objective. Image restoration techniques tend to be based on
mathematical or probabilistic models of image degradation. This
approach usually involves formulating a criterion of goodness (e.g..
PSNR) that will yield an optimal estimate of the desired result.
4. Color Image Processing: Color Image Processing is used to
extract features of interest in color images. It is gaining importance
because of increasing use of color images over the Internet.

5. Wavelets and Multi-resolution Analysis: Wavelets are used to


represent images in various degrees of resolution. It is also used in image
compression and for pyramidal representation in which images are
subdivided successively into smaller regions.
11
of
Fundamental Steps in
77
Digital Image Processing
6. Image Compression: Deals with reducing the storage requirements
of an image. The use of images has increased manifold in information
technology for the last few years, especially after the intensive use of the
Internet. The size of image affects the transmission quality of information
over Internet.

7. Morphological Processing: Deals with the tools for extracting


image components, which are useful in the representation and
description of region shape, such as boundaries, skeletons, and the
convex hull. This also includes the techniques for pre and post
processing, such as morphological filtering, thinning and pruning.

8. Image Segmentation: Deals with procedures for partitioning an


image into its constituent parts. For example, a scanned page may be
split into photographs, texts, tables and columns. In general autonomous
segmentation is one of the most difficult task in digital image processing.
12
of
Fundamental Steps in
77
Digital Image Processing
9. Image Representation and Description: It deals with extracting
attributes that result in some quantitative information of interest or are
basic for differentiating one class of objects from others. This stage
usually processes the data of segmentation stage. Description deals with
extracting attributes that are helpful in identifying an object.

10. Image Recognition: Image Recognition is a process which assigns


a label (based on its descriptors) to the digital image after matching it with
a known object. For example, the decision whether an image or part
thereof is the human face or not.
13
of
77
Key Stages in Digital Image Processing

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:

1.Image Sensors and Digitizers


2.Specialized Image Processing Hardware or Computer
3.Image Processing Software
4.Mass storage
5.Image Display and Hardcopy Devices
6.Image Transmission Systems
24
of
77
25
of
Components of an
77 Image Processing System
1. Image Sensors and Digitizer: Image Sensor is a physical
device that is sensitive to the light radiated by the object we wish to
image. A digitizer is a device that converts the analog form of the output
of an image sensor into digital form. For example, in a digital video
camera, the sensors produce an electrical output proportional to light
intensity and the digitizer converts these outputs to digital data.

2. Specialized Image Processing Hardware or Computer:


Although a general purpose computer can perform the operations on an
image after the related software is run on it, specialized hardware, on the
other hand, can perform some of the primitive operations very fast. For
example, a specialized hardware can be used to average image pixels
immediately after digitizing an image for the purpose of noise reduction.
The Computer performs the general purpose operations.
26
of
Components of an
77 Image Processing System
3. Image Processing Software: Software is required for image
processing operations. For example, image segmentation software can
segment the image into various components, an OCR system can
convert a document image into editable text and it can separate out the
various components of the document such as the text, tables, figures,
images, etc.
4. Mass Storage: Images require very large amount of storage. For
example, an image of the size 1024×1024 and capable of displaying 256
gray levels requires 1MB of space. Storage may be divided into three
categories:
 Short term storage: Storage for use during processing (computer
memory-RAM and video memory for image display).
 On-line Storage: for relatively fast recall (normally a hard disk or CDs).
 Archival Storage: for back up purpose (offline storage of many images)
such as magnetic tapes and optical disks.
27
of
Components of an
77 Image Processing System

5. Image Display and Hardcopy Devices: The display is


normally made on a video screen-monitor or computer
screen. Hardcopy devices include laser and inkjet printers
and plotters.
6. Image Transmission System: Image transmission system
has become an integral part of image processing. Images are
frequently exchanged over the Internet for processing them.
The key consideration in image transmission is the
bandwidth.
28
of
77
Types of Images
 There are basically three types of images:
1. Binary Image
2. Gray Scale Image
3. Color Image
4. Binary Image: A binary image has two levels: 0 (black) and 1 (white). Only one bit
is required to represent a pixel. Thus if the size of a binary image is M×N, then
M×N bits are needed to represent the image.
5. Gray Scale Image: A gray scale image has 256 gray levels, 0 to 255. A pixel is
represented by 8 bits or a byte. Thus a gray scale image of the size M×N will need
M×N bytes.
6. Color Image: A color image has more than one component and normally two
representations, RGB and CMY are most common. The color representation RGB
is used for video display devices and CMY is used for hard copy devices.
Each component requires one byte for its representation. Thus, a color
pixel requires 3 bytes of storage. The total numbers of colors is 256×256×256 =
2^24= 16.7 Million. An M×N size of color image will require 3×M×N bytes of
storage.
29
of
77
Spatial Resolution
 Spatial Resolution: It represents the number of pixels in an image. It is
given by

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

 Aspect Ratio: The ratio of an image width to its height, measured in


unit length or number of pixels, is referred to as its aspect ratio. A
1024×768 image has an aspect ratio of 4/3.
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

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:

• and four diagonal neighbors 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.

The three types of adjacency:


• 4-Adjacency: Two pixels and with values from are adjacent if is in the
set . (Here is the set of gray values , where is less than or equal to the
total number of gray levels).
37
of
77
Adjacency
• 8-Adjacency: Two pixels and with values from are adjacent if is in the
set .

where
• m-Adjacency (Mixed Adjacency): Two pixels and with values from are
m-adjacent if

 and the set ,


(i.e. the set has no pixel whose values are from V)
38
of
77
Adjacency
• Mixed adjacency is a modification of 8-adjacency. This is
used to eliminate the ambiguities that often arise when 8-
adjacency is used. Two image subsets S1 and S2 are adjacent
if some pixel in S1 is adjacent to some pixel in S2.

(a) (b) (c)


Pixels Pixels that are 8-Adjacent m-Adjacency
Arrangement to the Central Pixel.

• The top 3 pixels in (b) show multiple (ambiguous) 8-


adjacency, as indicated by the dashed lines. The ambiguity is
removed by using m-adjacency in (c).
39
of
77
Connectivity
• A (digital) path or curve from pixel with coordinate to pixel with
coordinate is a sequence of distinct pixels with coordinates

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

1. The Euclidean distance between p and q is defined as:

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

The pixels with are the 4-neighbors of .


42
of
77
Distance Measure
3. The D8 distance (also called chessboard distance) between p and q
is defined as:

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

• The pixels with are the 8-neighbors of .


43
of
77
Example
 Let and
 Assume pixel as source and pixel
as destination.

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.

The brightness of an image is the average pixel intensity of an


image. If a positive or negative constant is added to all the
pixels of an image, the average intensity of the image
increases or decreases.
48
of
Arithmetic Operations:
77 Image Addition

+𝟓𝟎=¿

Original Image 𝑲 Output Image


49
of
Arithmetic Operations:
77 Image Addition

+¿

Original Image Noise


50
of
Arithmetic Operations:
77 Image Addition

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

−𝟓𝟎=¿

Original Image 𝑲 Output Image


53
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

×𝟐=¿

Original Image 𝑲 Output Image


57
of
Arithmetic Operations:
77 Image Multiplication

Original Image Binary Mask


58
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

¿ 𝟐=¿

Original Image Output Image


𝑲
61
of
Arithmetic Operations:
77
Image or Alpha Blending
 This operation blends two images of same size to yield a
resultant image. This can be mathematically written as:

 is called blending ratio, which determines the influence of


each image on the resultant image.
62
of
Arithmetic Operations:
77 Image or Alpha Blending

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

You might also like