0% found this document useful (0 votes)
6 views46 pages

Digital Image Processing Essentials

Chapter 2 covers digital image fundamentals, including visual perception, light and the electromagnetic spectrum, and image sensing and acquisition. It explains the processes of image sampling and quantization, as well as pixel relationships and basic mathematical tools used in digital image processing. The chapter also discusses types of images, adjacency, connectivity, and geometric transformations.

Uploaded by

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

Digital Image Processing Essentials

Chapter 2 covers digital image fundamentals, including visual perception, light and the electromagnetic spectrum, and image sensing and acquisition. It explains the processes of image sampling and quantization, as well as pixel relationships and basic mathematical tools used in digital image processing. The chapter also discusses types of images, adjacency, connectivity, and geometric transformations.

Uploaded by

zaineb.bouaziz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CHAPTER 2 : DIGITAL IMAGE FUNDAMENTALS

TOPICS TO COVER
1) Elements of Visual Perception
2) Light and the Electromagnetic Spectrum
3) Image Sensing and Acquisition
4) Image Sampling and Quantization
5) Some Basic Relationships Between Pixels
6) Introduction to the Basic Mathematical Tools Used in Digital
Image Processing
2.1 ELEMENTS OF VISUAL PERCEPTION
STRUCTURE OF THE HUMAN EYE

Simplified diagram of a cross


section of the human eye.
IMAGE FORMATION IN THE EYE

Graphical representation of the eye looking at a palm tree. Point C is the focal center of the lens.

Photo camera: Focusing at various distances by varying distance between lens and imaging
plane (location of film or chip)

Human eye: Distance lens-imaging region (retina) is fixed. Focal length


for proper focus obtained by varying the shape of the lens.
SIMULTANEOUS CONTRAST PHENOMENON

Simultaneous contrast phenomenon: a region’s perceived


brightness does not depend simply on its intensity.
OPTICAL ILLUSIONS

The eye wrongly


perceives geometrical
properties of objects.

Same length?
Parallel lines?
2.2 LIGHT AND THE ELECTROMAGNETIC SPECTRUM
LIGHT AND THE ELECTROMAGNETIC SPECTRUM
LIGHT AND THE ELECTROMAGNETIC SPECTRUM
• In 1666, Isaac Newton discovered that when a beam of sunlight
passes through a glass prism, it is decomposed into a continuous
spectrum of colors ranging from violet to red.
LIGHT AND THE ELECTROMAGNETIC SPECTRUM
• Wavelength (𝜆) and frequency (f) are related by the expression :
𝐶
𝜆=
𝑓
• where c is the speed of light (2.998 * 108 m/s).
• The energy of the various components of the electromagnetic
spectrum is given by the expression :
𝐸 =ℎ∗𝑓
where h is Planck’s constant (6.626 × 10−34 m²kg/s )
2.3 IMAGE SENSING AND ACQUISITION
IMAGE SENSING AND ACQUISITION
• Image acquisition using a single sensor:
IMAGE SENSING AND ACQUISITION
• Image acquisition using sensor strips :
Image acquisition using
a linear sensor strip.

Image acquisition using


a circular sensor strip.
IMAGE SENSING AND ACQUISITION
• Image acquisition using sensor arrays :
• Imaging system collects the
incoming energy and focus
it onto an image plane
(sensor array)
• Sensor output:
analog signal => digitized
2.4 IMAGE SAMPLING AND QUANTIZATION
IMAGE SAMPLING AND QUANTIZATION
• To create a digital image, we need to convert the continuous
sensed data into a digital format.
• This requires two processes: sampling and quantization.
IMAGE SAMPLING AND QUANTIZATION
• Digitizing the coordinate values is
called sampling.
• Digitizing the amplitude values is
called quantization.

Image sampling
& quantization
REPRESENTING DIGITAL IMAGES
• Images can be designated by two-dimensional function of the
form f (x, y) containing M rows and N columns:
REPRESENTING DIGITAL IMAGES
❖ Suppose that we sample a continuous image
into a digital image, f (x, y), containing M
rows and N columns.

❖ The spatial coordinates values are shown by


integers as : x=0,x=1,… x=M-1
and y=0,y=1,… x=N-1

❖ For image f(x,y), we have L number of


intensity levels represented as a power of
2. For example, in an 8-bit image we have
256 intensity levels :
𝐿 = 2𝑘
REPRESENTING DIGITAL IMAGES
• We can represent a digital image in a traditional matrix form:
SPATIAL AND INTENSITY RESOLUTION
• Spatial resolution : the size
of the smallest discernible detail
in an image.
• It may be measured by the
number of pixels or dots per inch
“dpi” ( 1 inch = 2,54 cm )
SPATIAL AND INTENSITY RESOLUTION
• Intensity resolution : the smallest
Discernable change in the intensity level.
• It is measured in the number of bits
used for quantization.
TYPES OF IMAGES : BINARY IMAGE

I(x,y) ∈ {0, 1}
TYPES OF IMAGES : GRAYSCALE IMAGE

I(x,y) ∈ [0, 255]

140 139 138 138


139 138 138 138
138 138 138 139
138 138 139 140
TYPES OF IMAGES : COLOUR IMAGE

2
1

Image RGB 0
2.5 SOME BASIC RELATIONSHIPS BETWEEN PIXELS
NEIGHBORS OF A PIXEL
• A pixel p at coordinates (x, y) has two horizontal and two vertical neighbors
with coordinates :
(x + 1, y), (x − 1, y), (x, y + 1), (x, y − 1)
• This set of pixels, called the 4-neighbors of p, is denoted 𝑁4 (𝑝).
• The four diagonal neighbors of p have coordinates and are denoted 𝑁𝐷 (𝑝):
(x + 1, y + 1), (x + 1, y − 1), (x − 1, y + 1), (x − 1, y − 1)
• These neighbors, together with the 4-neighbors, are called the 8-neighbors
of p, denoted by 𝑁8 (𝑝).
• The set of image locations of the neighbors of a point p is called the
neighborhood of p.
ADJACENCY
• Let V be the set of intensity values used to define adjacency.
• In a binary image, V = {1} if we are referring to adjacency of
pixels with value 1.
• In a grayscale image, whose values are in the range 0 to 255, set
V could be any subset of these 256 values.
ADJACENCY
• We consider three types of adjacency:
1) 4-adjacency : Two pixels p and q with values from V are 4-adjacent if
q is in the set 𝑁4 (𝑝).
2) 8-adjacency : Two pixels p and q with values from V are 8-adjacent if
q is in the set 𝑁8 (𝑝).
3) m-adjacency (also called mixed adjacency) : Two pixels p and q with
values from V are m-adjacent if:
a) q is in 𝑁4 (𝑝) , or
b) q is in 𝑁𝐷 (𝑝) and the set 𝑁4 (𝑝) ∩ 𝑁4 (𝑞) has no pixels whose
values are from V
CONNECTIVITY
• A digital path (or curve) from pixel p with coordinates (𝑥0 , 𝑦0 )
to pixel q with coordinates (𝑥𝑛 , 𝑦𝑛 ) is a sequence of distinct
pixels with coordinates (𝑥0 , 𝑦0 ) (𝑥1 , 𝑦1 ) … (𝑥𝑛 , 𝑦𝑛 )
• In this case, n is the length of the path.
• We can define 4-, 8-, or m-paths, depending on 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.
BOUNDARY
• The complement 𝐴𝑐 of a set A is the set of points that are not in A.
• The boundary (also called the border or contour) of a region R is
the set of pixels in R that are adjacent to pixels in the complement
of R.
• Inner Border: Border of Foreground
• Outer Border: Border of Background
ADJACENCY
Not m-connected. They
have a common 4-
connected neighbor
DISTANCE MEASURES
• Consider pixels p and q with coordinates (x, y) and (u,v)
• The Euclidean distance between p and q is defined as :
𝐷𝑒 𝑝, 𝑞 = 𝑥−𝑢 2 + 𝑦−𝑣 2

• The 𝐷4 distance, (called the city-block distance) between p and q


is defined as :
𝐷4 𝑝, 𝑞 = 𝑥 − 𝑢 + 𝑦 − 𝑣
• For example, the pixels with 𝐷4 distance ≤ 2 from (x, y) (the
center point) form the following contours of constant distance:
DISTANCE MEASURES
• The 𝐷8 distance (called the chessboard distance) between p and
q is defined as :
𝐷8 𝑝, 𝑞 = max 𝑥 − 𝑢 , 𝑦 − 𝑣
• For example, the pixels with 𝐷8 distance ≤ 2 form the following
contours of constant distance:
• The pixels with 𝐷8 = 1 are the 8-neighbors
of the pixel at (x, y).
2.6 INTRODUCTION TO THE BASIC MATHEMATICAL
TOOLS USED IN DIGITAL IMAGE PROCESSING
MATRIX OPERATIONS
• Array product of 2 images A and B:
ARITHMETIC OPERATIONS
• Arithmetic operations between two images f (x, y) and g(x, y) are
denoted as :
ARITHMETIC OPERATIONS
• Using image addition (average) for noise reduction:

(a) Image of Galaxy corrupted by noise. (b) Result of averaging 100 noisy images
ARITHMETIC OPERATIONS
• Comparing images using subtraction:

(a) Mask image (b) image ( c) Difference between (a) and(b)


ARITHMETIC OPERATIONS
• Using image multiplication and division for shading correction and
for masking:

(a) Shaded pattern (b) estimated shaded pattern ( c) = Product of (a) by (b)
LOGICAL OPERATIONS
BASIC SET OPERATIONS
•𝐴∪𝐵 = 𝑤 𝑤 ∈ 𝐴 𝑂𝑅 𝑤 ∈ 𝐵 }
•𝐴∩𝐵 = 𝑤 𝑤 ∈ 𝐴 𝐴𝑁𝐷 𝑤 ∈ 𝐵 }
• 𝐴𝑐 = 𝑤 𝑤 ∉𝐴}
•𝐴 −𝐵 = 𝑤 𝑤 ∈ 𝐴 𝐴𝑁𝐷 𝑤 ∉ 𝐵} = 𝐴 ⋂ 𝐵𝑐
BASIC SET OPERATIONS
GEOMETRIC TRANSFORMATIONS
• We use geometric transformations to modify the spatial
arrangement of pixels in an image.
• The transformation of coordinates may be expressed as :
GEOMETRIC TRANSFORMATIONS

You might also like