0% found this document useful (0 votes)
16 views17 pages

ECE595 Speech and Image Processing Lec 2 Handsout

Uploaded by

Abo dahab
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)
16 views17 pages

ECE595 Speech and Image Processing Lec 2 Handsout

Uploaded by

Abo dahab
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
You are on page 1/ 17

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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.

ŠConsists of 2 sets:(1) a point set and (2) a value set

Digital Image Fundamentals ŠCan be represented in the form


I = {(x, a(x)): x X, a(x)  F}
where X and F are a point set and value set, respectively.

ŠAn element of the image, (x, a(x)) is called a pixel where


- x is called the pixel location and
1 - a(x) is the pixel value at the location x 3

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

Fundamentals of Digital Images Image Sensor: Charge-Coupled Device (CCD)


x

Origin
Š Used for convert a continuous
image into a digital image

y Š Contains an array of light sensors


Image “After snow storm” f(x,y)

Š 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

Binary image or black and white image


Intensity image or monochrome image
Each pixel contains one bit :
each pixel corresponds to light intensity
1 represent white
normally represented in gray scale (gray level).
0 represents black

Gray scale values


ª10 10 16 28º
« 9 6 26 37 » Binary data
« »
«15 25 13 22» ª0 0 0 0º
« » «0
«32 15 87 39 » 0 0 0»
« »
«1 1 1 1»
« »
5 «1 1 1 1» 7

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Image Types Digital Image Fundamentals Digital Image Fundamentals

Elements of Visual Perception


Color image or RGB image:
each pixel contains a vector
representing red, green and • The eye is nearly a sphere, with an average
blue components. diameter of approximately 20 mm.
• Three membranes enclose the eye: the
cornea and sclera outer cover; the choroid;
and the retina.
• The cornea is a tough, transparent tissue
RGB components that covers the anterior surface of the eye.
ª10 10 16 28º
« 9 ª656 70 56 » 43º • Continuous with the cornea, the sclera is
26 3756
« «32 ª99 54 7096 » 67 » 78º
«15 « 25«6013 902296
» » 67» an opaque membrane that encloses the
« « 21 « 54 47 » 42» »
«32 « 15«8587 8539 »43 » 92» Simplified diagram of a cross section of the human eye.
«54 « 65 65 39 » » remainder of the optic globe.
«32 65 87 996» 8
ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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.

Distribution of rods and cones in the retina.

9 11

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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

Brightness Adaptation and Discrimination


• Mach band: a brightness pattern
• The range of light intensity level to the human that is strongly scalloped, especially
system: from the scotopic threshold to glare near the boundary.
limit
• Brightness adaptation-the total range of distinct
intensity level it can discriminate is small when
• Simultaneous contrast: a region’s
compared with the total adaptation range perceived brightness does not simply
depend on its intensity.
• Subjective brightness: is a logarithmic function
of the light intensity incident on the eye
• Brightness adaptation level: the current
sensitivity level of the visual system (Ba)
• The range of subjective brightness that the eye
can perceive when adapted to this level (Bb) (a) An example showing that perceived brightness is not a
Range of subjective brightness simple function of intensity. The relative vertical positions
• A level at and below (Bb)-indistinguishable sensations showing a particular between the two profiles in (b) have no Special significance;
black adaptation level. they were chosen for clarity.
13 15

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

Light and the Electromagnetic Spectrum

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

Image Sensing and Acquisition


Wavelength

c
O E hQ
Q

(a) Single imaging sensor.


(b) Line sensor.
(c) Array sensor.
Graphical representation of one wavelength.

21 23

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

• Image sensing and acquisition


– Acquisition using a single sensor
• Microdensitometer
• A laser source coincident with the sensor
– Acquisition using a sensor strips
• Imaging acquisition using in-line sensors
• Computerized axial tomography
– Imaging acquisition using array sensors
• Electromagnetic and ultrasonic sensing devices
• CCD sensors - charge-coupled device
Combining a single sensor with motion to generate a 2-D image.
– A simple image formation model
• 2-D Image function : ࢌሺ࢞ǡ ࢟ሻ
– May be characterized by : amount of source illumination
incident on the scene and amount of illumination
reflected by the objects: ࢌሺ࢞ǡ ࢟ሻ ൌ ࡵሺ࢞ǡ ࢟ሻ ࢘ሺ࢞ǡ ࢟ሻ 22 24
ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

A Simple Image Formation Model


We shall denote images by two-dimensional functions of the form ࢌሺ࢞ǡ ࢟ሻǤ The value or
amplitude of ࢌ at spatial coordinates ሺ࢞ǡ ࢟ሻ is a positive scalar quantity whose physical
meaning is determined by the source of the image. Most of the images in which we are
interested in this course are monochromatic images, whose values are said to span the
gray scale. When an image is generated from a physical process, its values are
proportional to energy radiated by a physical source (e.g., electromagnetic waves). As a
consequence, ࢌሺ࢞ǡ ࢟ሻ must be nonzero and finite; that is,

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

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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

Image sampling and quantization

• Convert the continuous sensed data to digital form


– Sampling
• Spatial transform: spatial coordinates (discrete
locations)
– Quantization
• Amplitude transform: gray levels are converted to
discrete values
• The quality of a digital image is determined to a large (a) Continues image projected onto a sensor array.
degree by the number of samples and discrete gray (b) Result of image sampling and quantization.
levels

29 31

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

Image Sampling Representing Digital Images


and Quantization

Generating a digital image.


(a) Continuous image.
(b) A scan line from A to B in
the continuous image, used to
illustrate the concepts of
sampling and quantization.
(c) Sampling and quantization.
(d) Digital scan line.

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

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

• Two steps for zooming


– (1) the creation of new pixel locations
– (2) the assignment of gray levels to those new locations
• neighbor interpolation : nearest neighborhood interpolation
• Pixel replication
– Increase the size of an image an integer number of times
– a special case of nearest neighbor interpolation.
• Defect: produces a checkerboard effect
– Bilinear interpolation
• Image shrinking
– Equivalent process of pixel location is row-column deletion: shrink by a
non-integer factor
• Expand the grid to fit over the original image
• Do gray-level nearest neighbor or bilinear interpolation
• Shrink the grid to its original specified size
– Defect: Aliasing effect
• Sol: blur an image slightly
37 77
ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

T ical effects of var ing the number


of gra levels in a digital image. hile
kee ing the s atial resolution
constant.

a mage with a low level of detail.


b mage with a medium level of detail.
c mage with a relativel large amount of detail.

mage b courtes of the assachusetts nstitute of Technolog .


mage dis la ed in , , , and gra
levels.
77 73

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

e resentative iso reference curves for the


three t es of images in revious slide

mage dis la ed in , , , and gra levels.

77 77
ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

Some Basic Relationships Between Pixels

Neighbors of a Pixel (x,y-1) 4-neighbors of p:


i el at coordinates ሺ࢞ǡ ࢟ሻ has four hori ontal and vertical neighbors whose
coordinates are given b (x1,y)
(x-1,y) p (x+1,y)
ሺ࢞ ൅ ૚ǡ ࢟ሻǡ ሺ࢞ െ ૚ǡ ࢟ሻǡ ሺ࢞ǡ ࢟ ൅ ૚ሻǡ ሺ࢞ǡ ࢟ െ ૚ሻ (x+1,y)
This set of i els, called the neighbors of ࢖, is denoted b ࡺ૝ሺ࢖ሻ. ach i el is a N47p777
unit distance from ሺ࢞ǡ ࢟ሻǡ and some of the neighbors of ࢖ lie outside the digital image (x,y1)
(x,y+1)
if ሺ࢞ǡ ࢟ሻ is on the border of the image. (x,y+1)

The four diagonal neighbors of have coordinates


ሺ࢞ ൅ ૚ǡ ࢟ ൅ ૚ሻǡ ሺ࢞ ൅ ૚ǡ ࢟ െ ૚ሻǡ ሺ࢞ െ ૚ǡ ࢟ ൅ ૚ሻǡ ሺ࢞ െ ૚ǡ ࢟ െ ૚ሻ
and are denoted b ࡺࡰሺ࢖ሻ. These oints, together with the neighbors, are called the
neighbors of ࢖ǡ denoted b ࡺૡሺ࢖ሻ. s before, some of the oints in ࡺࡰሺ࢖ሻ and
ࡺૡሺ࢖ሻ fall outside the image if ሺ࢞ǡ ࢟ሻ is on the border of the image.
77 77

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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

(x-1,y-1) (x+1,y-1) DiDgonDDneighbors of p: – m-adjacency (mixed adjacency): Two pixels p and q


with values from V are m-adjacency if
p
(x1,y1) • q is in N 4 ( p), or
(x+1,y1) • q is in N D ( p) and the set N 4 ( p)  N 4 (q) has no pixels
N (p) = (x1,y 1) whose values are from V
(x-1,y+1) (x+1,y+1)
(x+1,y+1)

47 51

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

Neighbor of a pixel Adjacency


– 77777777777777777 7777777777777 A pixel p is adjacent to pixel q is they are connected.
– 4-neighbors of p Two image subsets S1 and S2 are adjacent if some pixel
– 8-neighbors of p
in S1 is adjacent to some pixel in S2
– Four diagonal neighbors
Adjacency, connectivity, regions, and boundaries
– Connectivity of two pixels: if two pixels are connected, it must be
determined
– If they are neighbors
– If their gray levels satisfy a specified criterion of similarity
– Three types of adjacency: 4-adjacency N4(V), 8-adjacency N8(V), m-
adjacency(mixed adjacency)
Digital path or curve S1
– Closed path S2
– 4-, 8-, or m-paths
We can define type of adjacency: 4-adjacency, 8-adjacency
77 or m-adjacency depending on type of connectivity. 52
ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

• ubset adjacency Adjacency, Connectivity, Regions, and Boundaries


– 71 and 72 are adjacent if some pixel in 71 is adjacent Connectivity between pixels is a fundamental concept that simplifies the definition of
to some pixel in 72 numerous digital image concepts, such as regions and boundaries. To establish if two
pixels are connected, it must be determined if they are neighbors and if their gray
• ath
levels satisfy a specified criterion of similarity (say, if their gray levels are equal).
– A path from ‫ ݌‬with coordinates ( , ) to pixel ‫ ݍ‬with Let V be the set of gray-level values used to define adjacency.
coordinates ( , t ) is a sequence of distinct pixels (a) 4-adjacency. Two pixels p and q with values from V are 4-adjacent if q is in the set
with coordinates N4(p).
– ( 7, 7) , ( 1 , 1 ),…, ( n , n ) (b) 8-adjacency. Two pixels p and q with values from V are 8-adjacent if q is in the set
N8(p).
(c) m-adjacency (mixed adjacency).Two pixels p and q with values from V are m-
adjacent if
where ( 7, 7) 7( , ) , ( n , n ) 7 ( , t ) , i. q is in N4(p), or
and pixels ( xi , y ) and ( xi 1 , yi 1 ) are adjacent ii. q is in ND(p) and the set N4(p) ∩ N4(q) has no pixels whose values are from V.

57 55

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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 represent a su set of pixels in an i age. wo pixels p and q are said to e


connected in if there exists a path etween the consisting entirel of pixels in . • Euclidean distance
or an pixel p in , the set of pixels that are connected to it in is called a connected
co ponent of . If it onl has one connected co ponent, then set is called a ‫݁ܦ‬ሺ‫݌‬ǡ ‫ݍ‬ሻ ൌ ሾሺ‫ ݔ‬െ ‫ݏ‬ሻʹ ൅ ሺ‫ ݕ‬െ ‫ݐ‬ሻʹ ሿͳ
Ȁʹ
connected set.

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

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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

a ࡰሺ࢖ǡ ࢗሻ ൒ ૙ ሺ ࡰሺ࢖ǡ ࢗሻ ൌ ૙ ࢏ࢌࢌ ࢖ ൌ ࢗ ሻǡ


ࡰሺ࢖ǡ ࢗሻ ൌ ࡰሺࢗǡ ࢖ሻǡ ࢇ࢔ࢊ
c ࡰሺ࢖ǡ ࢠሻ ൑ ࡰሺ࢖ǡ ࢗሻ ൅ ࡰሺࢗǡ ࢠሻǤ he pixels with D4 = 1 are the neigh ors of x, .
he uclidean distance etween p and q is defined as
he D8 distance also called chess oard distance etween p and q is defined as
Ȁʹ
‫݁ܦ‬ሺ‫݌‬ǡ ‫ݍ‬ሻ ൌ ሾሺ‫ ݔ‬െ ‫ݏ‬ሻʹ ൅ ሺ‫ ݕ‬െ ‫ݐ‬ሻʹ ሿͳ
or this distance easure, the pixels ha ing a distance less than or equal to so e alue r fro In this case, the pixels with D8 distance fro x, less than or equal to so e alue r for a
x, are the points contained in a dis of radius r centered at x, . square centered at x, . or exa ple, the pixels with D8 distance fro x, the center point
he distance also called cit loc distance etween p and q is defined as for the following contours of constant distance

‫ܦ‬Ͷሺ‫݌‬ǡ ‫ݍ‬ሻ ൌ ȁ‫ ݔ‬Ȃ ‫ݏ‬ȁ ൅ ȁ‫ ݕ‬Ȃ ‫ݐ‬ȁ


In this case, the pixels ha ing a distance fro x, less than or equal to so e alue r for a
dia ond centered at x, .

58 he pixels with D8 = 1 are the neigh ors of x, . 60


ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

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

Linear and Nonlinear Operations Logical Operations

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

ECE595_Speech and Image Processing ECE595_Speech and Image Processing

Chapter 2 Chapter 2
Digital Image Fundamentals Digital Image Fundamentals

Set Operations Image Transforms

66 68

You might also like