ECE595 Speech and Image Processing Lec 2 Handsout
ECE595 Speech and Image Processing Lec 2 Handsout
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Digital Images
ECE595 Speech and Image Processing
Digital image: an image that has been discretized both in
Spatial coordinates and associated value.
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Origin
Used for convert a continuous
image into a digital image
An image: a multidimensional function of spatial coordinates. Converts photon into electric charges
Spatial coordinate: (x, y) for 2D case such as photograph,
(x, y, z) for 3D case such as CT scan images CCD KAF-3200E from Kodak. accumulated in each sensor unit
(x, y, t) for movies (2184 x 1472 pixels,
The function f may represent intensity (for monochrome images) Pixel size 6.8 microns2)
or color (for color images) or other associated values.
2 4
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Image Types Digital Image Fundamentals Image Types Digital Image Fundamentals
Chapter 2 Chapter 2
Image Types Digital Image Fundamentals Digital Image Fundamentals
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
The innermost membrane of the eye is the retina, which lines the inside of
the wall’s entire posterior portion. When the eye is properly focused, light from
an object outside the eye is imaged on the retina. Pattern vision is afforded by
the distribution of discrete light receptors over the surface of the retina.
9 11
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
There are two classes of receptors: cones and rods. The cones in each eye
Image Formation in the Eye
number between 6 and 7 million. They are located primarily in the central portion of
the retina, called the fovea, and are highly sensitive to color. Humans can resolve fine
details with these cones largely because each one is connected to its own nerve end.
Muscles controlling the eye rotate the eyeball until the image of an object of interest
falls on the fovea. Cone vision is called photopic or bright-light vision.
The number of rods is much larger: Some 75 to 150 million are distributed over the
retinal surface. The larger area of distribution and the fact that several rods are
connected to a single nerve end reduce the amount of detail discernible by these
receptors. Rods serve to give a general, overall picture of the field of view. They are Graphical representation of the eye looking at a palm tree. Point C is the optical center of the lens.
not involved in color vision and are sensitive to low levels of illumination. For example,
The distance between the center of the lens and the retina (called the focal length) varies from
objects that appear brightly colored in daylight when seen by moonlight appear as approximately 17 mm to about 14 mm, as the refractive power of the lens increases from its
colorless forms because only the rods are stimulated. This phenomenon is known minimum to its maximum. When the eye focuses on an object farther away than about 3 m, the
as scotopic or dim-light vision. lens exhibits its lowest refractive power. When the eye focuses on a nearby object, the lens is
10 most strongly refractive. 12
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Typical Weber ratio as a function of intensity. Basic experimental setup used to characterize
Examples of simultaneous contrast. All the inner squares have the same intensity,
brightness discrimination. but they appear progressively darker as the background becomes lighter.
14 16
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Some well-known
optical illusions.
17 19
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
The electromagnetic spectrum. The visible spectrum is shown zoomed to facilitate explanation, but note that
18 the visible spectrum is a rather narrow portion of the EM spectrum. 20
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
c
O E hQ
Q
21 23
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
The function ࢌሺ࢞ǡ ࢟ሻ may be characterized by two components: (1) the amount of
source illumination incident on the scene being viewed, and (2) the amount of
illumination reflected by the objects in the scene. Appropriately, these are called the
illumination and reflectance components and are denoted by ሺ࢞ǡ ࢟ሻ ࢇࢊ ࢘ሺ࢞ǡ ࢟ሻ,
(a) Image acquisition using a linear sensor strip. respectively. The two functions combine as a product to form f(x, y):
(b) Image acquisition using a circular sensor strip.
25 27
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
We call the intensity of a monochrome image at any coordinates (x0, y0) the gray level
of the image at that point. That is,
An example of the digital image acquisition process. (a) Energy (“illumination”) source. (b) An element of
a scene. (c) Imaging system. (d) Projection of the scene onto the image plane. (e) Digitized image.
26 28
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
29 31
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
30 32
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
• The complete ࡹuࡺ digital image in the matrix form: ࢌሺ࢞ǡ ࢟ሻ We assume that the discrete levels are equally spaced and that they are integers in the
– Pixel, picture element interval [0, L-1]. Sometimes the range of values spanned by the gray scale is called the
• A digital image use a traditional matrix A dynamic range of an image, and we refer to images whose gray levels span a
– The number of gray levels ࡸ ൌ significant portion of the gray scale as having a high dynamic range.
– The dynamic range of an image : the range of values spanned The number, b, of bits required to store a digitized image is:
by the gray scale
ܾ ൌ ܯൈ ܰ ൈ ݇Ǥ
• High contrast image : an image whose gray levels span a
significant portion of the gray scale as having a high When M = N, this equation becomes:
dynamic range
ܾ ൌ ܰଶ ൈ ݇
– The number, ࢈, of bits required to store a digitized image is
࢈ ൌ ࡹ uࡺ uࡷ
33 35
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Expressing sampling and quantization in more formal mathematical terms can be The number of bits required to store square images with various values of N and k.
useful at times. Let Z and R denote the set of real integers and the set of real numbers,
respectively. The sampling process may be viewed as partitioning the xy-plane into a
grid, with the coordinates of the center of each grid being a pair of elements from the
Cartesian product Z2, which is the set of all ordered pairs of elements (zi, zj), with zi and
zj being integers from Z.
This digitization process requires decisions about values for M, N, and for the number,
L, of discrete gray levels allowed for each pixel. There are no requirements on M and N,
other than that they have to be positive integers. However, due to processing, storage,
and sampling hardware considerations, the number of gray levels typically is an integer
power of 2:
34 36
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
• Spatial and gray-level resolution Spatial and Gray-Level Resolution
• Sampling is the principal factor determining the spatial resolution
• Gray-level resolution: the smallest discernible range in gray level
– is the power of 2 due to hardware considerations
– The most common number: 8 bits
• Spatial resolution
– Sub-sampling
– Resampling
• Keep the number of samples constant and reduce the number of
gray levels
– Reduce the number of bits while keeping the spatial constant
• Vary N and k simultaneously T ical effects of var ing the number of
– ISO reference curves sam les in a digital image. The number
of allowed gra levels was ke t at .
• If the number of bit are fixed, how to adjust the trade-off between
spatial and gray-level resolution?
37 37
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
77 77
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
77777 x
(x-1,y-1) (x,y-1) (x+1,y-1) 8-neighbors of p:
7x-17
y-17 7x7
y-17 7x+17
y-17 (x-1,y) p (x+1,y)
(x1,y1)
(x,y1)
(x+1,y1)
(x-1,y+1) (x,y+1) (x+1,y+1)
7x-17
y7 7x7
y7 7x+17
y7 (x1,y)
y N8(p) = (x+1,y)
(x1,y+1)
7x-17
y+17 7x7
y+17 7x+17
y+17 (x,y+1)
(x+1,y+1)
76 48
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
47 51
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
57 55
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
• Region A (digital) path (or curve) from pixel with coordinates ሺ࢞ ǡ ࢟ሻ to pixel
– We call R a region of the image if R is a connected set with coordinates ሺ࢙ ǡ ࢚ሻ is a sequence of distinct pixels with
• Boundary
– The boundary of a region R is the set of pixels in the region that coordinates
have one or more neighbors that are not in R ሺ࢞ ǡ ࢟ሻǡ ሺ࢞ ǡ ࢟ሻǡ ǥ ǡ ሺ࢞ ǡ ࢟ሻ
• Edge
– Pixels with derivative values that exceed a preset threshold where ሺ࢞ ǡ ࢟ሻ ൌ ሺ࢞ ǡ ࢟ሻǡ ሺ࢞ ǡ ࢟ሻ ൌ ሺ࢙ ǡ ࢚ሻǡ and pixels ሺ࢞ ǡ ࢟ሻ and
ሺ࢞ െ ǡ ࢟ െ ሻ are adjacent for Ǥ In this case, is the
length of the path.
If ሺ࢞ ǡ ࢟ሻ ൌ ሺ࢞ ǡ ࢟ሻ the path is a closed path
54 56
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
et e a su set of pixels in an i age. e call a region of the i age if is a The D4 distance (also called city-block distance) between p and q is
connected set. defined as:
he oundar also called order or contour of a region is the set of pixels in the ܦͶሺǡ ݍሻ ൌ ȁ ݔȂ ݏȁ ȁ ݕȂ ݐȁ
region that ha e one or ore neigh ors that are not in . If happens to e an entire
i age which we recall is a rectangular set of pixels , then its oundar is defined as
the set of pixels in the first and last rows and colu ns of the i age. his extra The D8 distance (also called chessboard distance) between p and q
definition is required ecause an i age has no neigh ors e ond its order. or all , is defined as:
when we refer to a region, we are referring to a su set of an i age, and an pixels in
the oundar of the region that happen to coincide with the order of the i age are
included i plicitl as part of the region oundar . ܦͺሺǡ ݍሻ ൌ ሺȁ ݔȂ ݏȁǡ ȁ ݕȂ ݐȁሻ
57 59
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
Distance Measures or exa ple, the pixels with D4 distance fro x, the center point for the following
or pixels ǡ ǡ ࢇࢊ ࢠǡ with coordinates ሺ࢞ǡ ࢟ሻǡ ሺ࢙ǡ ࢚ሻǡ ࢇࢊ ሺ࢜ǡ ࢝ሻǡ respecti el , is a distance contours of constant distance
function or etric if
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
The shortest 8-path is shown in Fig. P2.15(b) its length is 4. In this case the
length of shortest m- and 8-paths is the same. Both of these shortest paths are
unique in this case.
61 63
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
(b) One possibility for the shortest 4-path when V = (1, 2) is shown in Fig. (a)
(a) When V = {0, 1}, 4 path does not exist between p and q because it is its length is 6. It is easily verified that another 4-path of the same length
impossible to get from p to q by traveling along points that are both exists between p and q.
4adjacent and also have values from V . The next figure shows this One possibility for the shortest 8-path (it is not unique) is shown in Fig. (b)
condition it is not possible to get to q. its length is 4. The length of a shortest m-path similarly is 4.
62 64
ECE595_Speech and Image Processing ECE595_Speech and Image Processing
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
et e an operator whose input and output are i ages. is said to e a linear operator if, for
an two i ages f and g and an two scalars a and ,
In other words, the result of appl ing a linear operator to the su of two i ages that ha e een
ultiplied the constants shown is identical to appl ing the operator to the i ages
indi iduall , ultipl ing the results the appropriate constants, and then adding those
results. or exa ple, an operator whose function is to co pute the su of i ages is a linear
operator. n operator that co putes the a solute alue of the difference of two i ages is not.
n operator that fails the test of a o e equation is definition nonlinear.
inear operations are exceptionall i portant in i age processing ecause the are ased on a
significant od of well understood theoretical and practical results. lthough nonlinear
operations so eti es offer etter perfor ance, the are not alwa s predicta le, and for the
ost part are not well understood theoreticall .
65 67
Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals
66 68