Chapter 2. Digital Image Fundamentals
Chapter 2. Digital Image Fundamentals
2
1. Image Sensing and Acquisition
Combining a single sensing element with mechanical motion to generate a 2-D image.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 4
1. Image Sensing and Acquisition
8
2. Image Sampling and Quantization
where k is an integer.
➢ The discrete levels are equally spaced and that they are integers in the range
[0, L-1]
➢ When M = N:
Number of megabytes
required to store
images for various
values of N and k
Illustration of column scanning for generating linear indices. Shown are several
2-D coordinates (in parentheses) and their corresponding linear indices.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 16
2. Image Sampling and Quantization
(a) 256-level image. (b)-(d) Image displayed in 128, 64, and 32 intensity levels, while keeping the image
size constant. (e)-(h) Image displayed in 16, 8, 4, and 2 intensity levels.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 18
2. Image Sampling and Quantization
(a) Image with a low level of detail. (b) Image with a medium level of detail. (c) Image with a
relatively large amount of detail.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 19
2. Image Sampling and Quantization
❖Image Interpolation
➢ Interpolation is the process of using known data to estimate values at unknown
locations.
➢ Nearest neighbor interpolation
➢ Bilinear interpolation
➢ Bicubic interpolation
❖Image Interpolation
(a) Image reduced to 72 dpi and zoomed back to its original 930 dpi using nearest neighbor
interpolation. (b) Image reduced to 72 dpi and zoomed using bilinear interpolation. (c) Same as
(b) but using bicubic interpolation.
23
3. Some Basic Relationships Between Pixels
❖Neighbors of a Pixel
➢ A pixel p at coordinates (x, y)
➢ N4(p): 4-neighbors of p
❖Adjacency
➢ Let V be the set of intensity values used to define adjacency.
❖Adjacency
➢ V = {1}
(a) An arrangement of pixels. (b) Pixels that are 8-adjacent (adjacency is shown by dashed lines). (c) m-
adjacency. (d) Two regions (of 1’s) that are 8-adjacent. (e) The circled point is on the boundary of the 1-valued
pixels only if 8-adjacency between the region and background is used. (f) The inner boundary of the 1-valued
region does not form a closed path, but its outer boundary does.
❖Connectivity
➢ A digital path (or curve) from pixel p with coordinates (x0, y0) to pixel q with
coordinates (xn, yn) is a sequence of distinct pixels with coordinates:
❖Connectivity
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.
➢ The set of pixels that are connected to p in S is called a connected component of
S.
➢ If it only has one component, and that component is connected, then S is called a
connected set.
❖Regions
Let R represent a subset of pixels in an image.
➢ We call R a region of the image if R is a connected set.
➢ Two regions, Ri and Rj are said to be adjacent if their union forms a connected
set.
➢ Regions that are not adjacent are said to be disjoint.
➢ Foreground: the union of all the K disjoint regions (Ru)
➢ Background: the complement of the set Ru: (Ru)c
❖Regions
background
foreground
❖Boundaries
➢ 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.
❖Distance Measures
➢ For pixels p, q, and s, with coordinates (x, y), (u, v), and (w, z), respectively, D is a
distance function or metric if:
❖Distance Measures
➢ The Euclidean distance between p and q is defined as:
The distance D4, (city-block distance) The distance D8, (chessboard distance)
34
4. Basic Mathematical Tools Used in Digital Image Processing
❖Arithmetic Operations
➢ Arithmetic operations between two images f(x, y) and g(x, y)
(a) Infrared image of the Washington, D.C. area. (b) Image resulting from setting to zero the least significant
bit of every pixel in (a). (c) Difference of the two images, scaled to the range [0, 255] for clarity.
❖Logical Operations
❖Logical Operations
Illustration of logical
operations involving
foreground (white) pixels.
Black represents binary
0’s and white binary 1’s.
The dashed lines are
shown for reference only.
They are not part of the
result.
❖Single-Pixel Operations
(a) An 8-bit image. (b) Intensity transformation function used to obtain the digital equivalent of a “photographic”
negative of an 8-bit image. The arrows show transformation of an arbitrary input intensity value into its
corresponding output value (c) Negative of (a), obtained using the transformation function in (b).
❖Neighborhood Operations
(2)
❖Geometric Transformations
❖Geometric Transformations
❖Geometric Transformations
❖Geometric Transformations
❖Geometric Transformations
❖Image Registration
Forming a vector from corresponding pixel values in three RGB component images.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 53
4. Basic Mathematical Tools Used in Digital Image Processing
❖Image Transforms
➢ 2-D linear transforms
➢ Inverse transform
❖Image Transforms
❖Image Transforms