Professional Documents
Culture Documents
Chapter 2 - Digital
Image Fundamentals
koochari@gmail.com Abbas Koochari
1
Human Visual Perception
2
The Human Eye
Diameter: 20 mm
3
Structure of the Human Eye
Retina includes
- Rods (94%)
Lens helps to focus (light sensitive)
light on the retina.
- Cones (6%)
(color sensitive)
Cones are
concentrated in
the center of the
retina - the fovea
4
The Choroid
The choroid contains blood vessels for eye nutrition and
is heavily pigmented to reduce extraneous light entrance
and backscatter.
5
The Lens
The lens is made up of fibrous cells and is suspended by
fibers that attach it to the ciliary body.
6
The Retina
The retina lines the entire posterior portion.
7
Cones
Cones are located in the fovea and are sensitive to color.
8
Rods
Rods are giving a general, overall picture of the field of
view and are not involved in color vision.
9
Receptor Distribution
The distribution of receptors is radially symmetric about
the fovea.
10
Cones & Rods
11
The Fovea
The fovea is circular (1.5 mm in diameter) but can be
assumed to be a square sensor array (1.5 mm x 1.5 mm).
12
Image Formation in the Eye
The eye lens (if compared to an optical lens) is flexible.
13
Image Formation in the Eye
Distance between the center of the lens and the retina
(focal length):
varies from 17 mm to 14 mm (refractive power of lens goes
from minimum to maximum).
14
Image Formation in the Eye
Example:
Calculation of retinal image of an object
15 x
100 17
x 2.55 mm
15
Image Formation in the Eye
Perception takes place by the relative excitation of light
receptors.
16
Brightness Adaptation & Discrimination
17
Illustration
Brightness adaptation
18
Brightness Adaptation & Discrimination
19
Brightness Adaptation & Discrimination
I c
Weber ratio
I
Where: Ic: the increment of illumination
discriminable 50% of the time and
I : background illumination
20
Experiments on Discrimination
21
Discriminate
22
Brightness Adaptation & Discrimination
23
Brightness Adaptation & Discrimination
24
Brightness Adaptation & Discrimination
25
Mach Bands Effect
26
Simultaneous Contrast
27
Optical Illusions
28
2.2 Light and the Electromagnetic Spectrum
29
Light and the Electromagnetic Spectrum
(1)
2.1- Elements of
Visual Perception
In 1666, Sir Isaac Newton discovered that when a beam of
2.2- Light and the sunlight is passed through a glass prism, the emerging beam of
Electromagnetic light is not white but consists instead of a continuous spectrum
Spectrum
of colors ranging from violet at one end to red at the other.
2.3- Image Sensing
and Acquisition The range of colors we perceive in visible light represents a very
small portion of the electromagnetic spectrum.
2.4- Image Sampling
and Quantization
On one end of the spectrum are radio waves with wavelengths
2.5- Some Basic billions of times longer than those of visible light.
Relationships
Between Pixels
On the other end of the spectrum are gamma rays with
2.6- An Introduction
to the Mathematical
wavelengths millions of times smaller than those of visible light.
Tools Used in Digital
Image Processing
30
Light and the Electromagnetic Spectrum
(2)
2.1- Elements of
Visual Perception
=
2.2- Light and the
Electromagnetic
Spectrum
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
33
Light and the Electromagnetic Spectrum
(5)
2.1- Elements of
Visual Perception
Electromagnetic waves can be visualized as propagating
2.2- Light and the sinusoidal waves with wavelength, or they can be thought of as a
Electromagnetic stream of mass-less particles, each traveling in a wavelike pattern
Spectrum and moving at the speed of light. Each mass-less particle contains
a certain amount (or bundle) of energy. Each bundle of energy is
2.3- Image Sensing
and Acquisition called a photon.
2.1- Elements of
Visual Perception
2.2- Light and the Light is a particular type of electromagnetic radiation that can be
Electromagnetic seen and sensed by the human eye.
Spectrum
2.3- Image Sensing The visible band of the electromagnetic spectrum spans the
and Acquisition range from approximately 0.43 micro m (violet) to about 0.79
micro m (red).
2.4- Image Sampling
and Quantization
For convenience, the color spectrum is divided into six broad
2.5- Some Basic regions: Violet, Blue, Green, Yellow, Orange, and Red.
Relationships
Between Pixels
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
35
The Origins of Digital Image Processing
(color)
2.1- Elements of
Visual Perception
The colors that humans perceive in an object are determined by
2.2- Light and the the nature of the light reflected from the object.
Electromagnetic
Spectrum
A body that reflects light and is relatively balanced in all visible
2.3- Image Sensing wavelengths appears white to the observer.
and Acquisition
2.4- Image Sampling A body that favors reflectance in a limited range of the visible
and Quantization
spectrum exhibits some shades of color.
2.5- Some Basic For example, green objects reflect light with wavelengths
Relationships primarily in the 500 to 570 nm range while absorbing most
Between Pixels of the energy at other wavelengths.
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
36
The Origins of Digital Image Processing
(Achromatic or Monochromatic)
2.1- Elements of
Visual Perception
2.2- Light and the Light that is void of color is called achromatic or
Electromagnetic
Spectrum monochromatic light.
2.4- Image Sampling The term gray level generally is used to describe monochromatic
and Quantization
intensity because it ranges from black, to grays, and finally to
2.5- Some Basic
white.
Relationships
Between Pixels
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
37
The Origins of Digital Image Processing
(Chromatic light)
2.1- Elements of
Visual Perception
2.2- Light and the Chromatic light spans the electromagnetic energy spectrum from
Electromagnetic
Spectrum approximately 0.43 to 0.79 m, as noted previously.
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
38
The Origins of Digital Image Processing
(Chromatic light)
2.1- Elements of
Visual Perception
Radiance is the total amount of energy that flows from the light
2.2- Light and the source, and it is usually measured in watts (W).
Electromagnetic
Spectrum
Luminance, measured in lumens (lm), gives a measure of the
2.3- Image Sensing amount of energy an observer perceives from a light source.
and Acquisition
For example, light emitted from a source operating in the
2.4- Image Sampling far infrared region of the spectrum could have significant
and Quantization energy (radiance), but an observer would hardly perceive it;
its luminance would be almost zero.
2.5- Some Basic
Relationships
Between Pixels Brightness is a subjective descriptor of light perception that is
practically impossible to measure. It embodies the achromatic
2.6- An Introduction
to the Mathematical
notion of intensity and is one of the key factors in describing
Tools Used in Digital color sensation.
Image Processing
39
2.3 Image Sensing and Acquisition
40
Image Sensing and Acquisition
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
41
Introduction(1)
2.1- Elements of
Visual Perception
2.2- Light and the Incoming energy is transformed into a voltage by the
Electromagnetic
Spectrum combination of input electrical power and sensor material that is
responsive to the particular type of energy being detected.
2.3- Image Sensing
and Acquisition
The output voltage waveform is the response of the sensor(s),
2.4- Image Sampling and a digital quantity is obtained from each sensor by digitizing
and Quantization its response.
2.5- Some Basic
Relationships
Between Pixels
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
42
Introduction(2)
2.1- Elements of
Visual Perception
44
Image Acquisition Using Sensor Strips
45
Image Sensing and Acquisition
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
46
Image Acquisition Using Sensor Arrays
47
Image Acquisition Using Sensor Arrays
2.2- Light and the روش اصلی به کارگیری آرایه ای از حسگرها در شکل قبل آمده است .این شکل،
Electromagnetic انرژی را از منبع روشنائی نشان می دهد که در حال انعکاس از یک عنصر محیطی
Spectrum است.
2.3- Image Sensing
and Acquisition اولین کار انجام شده توسط سیستم تصویربرداری در این شکل جمع آوری انرژی
ورودی و متمرکز کردن آن روی صفحه تصویر است .اگر روشنائی نور باشد،
2.4- Image Sampling
and Quantization
بخش جلوئی سیستم ،یک لنز نوری است که صحنه دیده شده را روی صفحه کانونی
لنز تصویربرداری می کند.
2.5- Some Basic
Relationships
Between Pixels
آرایه حسگر ،که مطابق با صفحه کانونی است ،خروجی هائی را تولید می کند که
متناسب با انتگرال نور دریافتی در هر حسگر است.
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
48
Image Sensing and Acquisition
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
49
A Simple Image Model
Image: a 2-D light-intensity function f(x,y)
50
A Simple Image Model
Nature of f(x,y):
51
A Simple Image Model
Illumination: i(x,y)
Reflectance: r(x,y)
52
A Simple Image Model
Sample values of r(x,y):
0.01: black velvet
0.93: snow
53
A Simple Image Model
Intensity of a monochrome image f at (xo,yo): gray level l
of the image at that point
l=f(xo, yo)
Lmin ≤ l ≤ Lmax
Where Lmin: positive
Lmax: finite
54
A Simple Image Model
In practice:
Lmin = imin rmin and
Lmax = imax rmax
55
Sampling & Quantization
The spatial and amplitude digitization of f(x,y) is called:
56
Digital Image
57
Sampling and Quantization
اختصاصیکمقدارشدتبههرجفتازمختصات) (x,yراکوانتیزهکردنمیگویند.
تصویرپیوستهرویآرایهحسگر نتیجهنمونهبرداریوکوانتیزهکردن
58
A Digital Image
59
Sampling & Quantization
60
Sampling & Quantization
61
Sampling & Quantization
62
Sampling & Quantization
f(x,y) is a digital image if:
63
Sampling & Quantization
The digitization process requires decisions about:
and
64
Sampling & Quantization
Usually, in DIP these quantities are integer powers of two:
N=2n M=2m and G=2k
65
Representing Digital Images
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
66
Representing Digital Images
2.2- Light and the حداکثر شدت قابل اندازه گیری به
Electromagnetic
Spectrum حداقل سطح شدت اندازهگیری در
2.1- Elements of
Visual Perception
The number , b, of bits required to store a digitized image is:
2.2- Light and the b=M*N*K
Electromagnetic When M=N, this equation becomes
Spectrum
b = (N2)*K
2.3- Image Sensing
and Acquisition
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
68
Image Sampling and Quantization
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
69
Spatial and Intensity Resolution
2.1- Elements of
Visual Perception 1250DPI 300DPI
معیاری از کوچکترین بخش: دقت فضائی
2.2- Light and the
Electromagnetic .قابل تمیز در تصویر است
Spectrum
2.6- An Introduction
کوچکترین تغییر قابل تشخیص: دقت شدت
to the Mathematical
Tools Used in Digital .در سطح شدت است
Image Processing
70
Spatial and Intensity Resolution
2.1- Elements of
Visual Perception
How many samples and gray levels are required for a good
2.2- Light and the approximation?
Electromagnetic
Spectrum
Resolution (the degree of discernible detail) of an image
2.3- Image Sensing depends on sample number and gray level number.
and Acquisition
i.e. the more these parameters are increased, the closer the
2.4- Image Sampling digitized array approximates the original image.
and Quantization But: storage & processing requirements increase rapidly as
a function of N, M, and k
2.5- Some Basic
Relationships
Between Pixels
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
71
Spatial and Intensity Resolution
2.1- Elements of
Visual Perception
2.2- Light and the Different versions (images) of the same object can be generated
Electromagnetic
Spectrum through:
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
72
Spatial and Intensity Resolution
(Ex1)
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
73
Spatial and Intensity Resolution
(Ex1)
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
74
Spatial and Intensity Resolution
(Ex2)
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
75
Spatial and Intensity Resolution
(Ex2)
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
76
Spatial and Intensity Resolution
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
77
Spatial and Intensity Resolution
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
78
Detail Level
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
79
Image Sampling and Quantization
2.1- Elements of
Visual Perception
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
80
)Image Interpolation(1
2.2- Light and the درونیابی ،فرایند استفاده از دادههای شناخته برای برآورد مقادیر در مکانهای
Electromagnetic ناشناخته است.
Spectrum
2.3- Image Sensing درونیابی نزدیکترین همسایه :روشی است که به هر مکان جدید ،شدت
and Acquisition نزدیکترین همسایهاش در تصویر اصلی را نسبت میدهد .در این روش
احتمال نتیجه نامطلوب در خمیدگی شدید لبه ها مستقیم وجود دارد.
2.4- Image Sampling
and Quantization
درونیابی دوخطی :از چهار نزدیکترین همسایه برای برآورد شدت در
2.5- Some Basic مکان مورد نظر استفاده میشود.
Relationships
Between Pixels
درونیابی دو مکعبی :شامل شانزده نزدیکترین همسایه یک نقطه برای
2.6- An Introduction برآورد است.
to the Mathematical
Tools Used in Digital
Image Processing
81
Image Interpolation(2)
2.1- Elements of
Visual Perception
2.1- Elements of
Visual Perception
An adaptive sampling scheme can improve the appearance of an
2.2- Light and the
Electromagnetic image, where the sampling would consider the characteristics of
Spectrum the image.
2.3- Image Sensing
and Acquisition i.e. fine sampling in the neighborhood of sharp gray-level
transitions (e.g. boundaries)
2.4- Image Sampling Coarse sampling in relatively smooth regions
and Quantization
2.6- An Introduction
to the Mathematical
Tools Used in Digital
Image Processing
83
2.5 Some Basic Relationships
Between Pixels
84
Some Basic Relationships Between Pixels
Definitions:
85
Neighbors of a Pixel
A pixel p at (x,y) has 2 horizontal and 2 vertical
neighbors:
86
Neighbors of a Pixel
The 4 diagonal neighbors of p are: (ND(p))
87
Connectivity
Connectivity between pixels is important:
88
Connectivity
Two pixels are connected if:
89
Adjacency
We consider three types of adjacency:
90
Adjacency
The third type of adjacency:
q is in N4(p) or
q is in ND(p) and the set N4(p)N4(q) has no pixels with values from
V
91
Adjacency
Mixed adjacency is a modification of 8-adjacency and is
used to eliminate the multiple path connections that
often arise when 8-adjacency is used.
0 1 1 0 1 1 0 1 1
0 1 0 0 1 0 0 1 0
0 0 1 0 0 1 0 0 1
92
Adjacency
93
Path
A path (curve) from pixel p with coordinates (x,y) to
pixel q with coordinates (s,t) is a sequence of distinct
pixels:
94
Paths
4-, 8-, m-paths can be defined depending on the type of
adjacency specified.
95
Connectivity
For any pixel p in S, the set of pixels in S that are
connected to p is a connected component of S.
96
Boundary
R a subset of pixels: R is a region if R is a connected set.
Its boundary (border, contour) is the set of pixels in R
that have at least one neighbor not in R
Edge can be the region boundary (in binary images)
97
Distance Measures
For pixels p,q,z with coordinates (x,y), (s,t), (u,v), D is a
distance function or metric if:
98
Distance Measures
Euclidean distance:
99
Distance Measures
D4 distance (city-block distance):
2
2 1 2
2 1 0 1 2 D4 = 1 are the 4-neighbors of p
2 1 2
2
100
Distance Measures
D8 distance (chessboard distance):
D8(p,q) = max(|x-s|,|y-t|)
Forms a square centered at p
e.g. pixels with D8≤2 from p
2 2 2 2 2
2 1 1 1 2
2 1 0 1 2 D8 = 1 are the 8-neighbors of p
2 1 1 1 2
2 2 2 2 2
101
Distance Measures
D4 and D8 distances between p and q are independent of
any paths that exist between the points because these
distances involve only the coordinates of the points
(regardless of whether a connected path exists between
them).
102
Distance Measures
However, for m-connectivity the value of the distance
(length of path) between two pixels depends on the
values of the pixels along the path and those of their
neighbors.
103
Distance Measures
e.g. assume p, p2, p4 = 1
p1, p3 = can have either 0 or 1
104
Chapter 2 - The end
105