0% found this document useful (0 votes)
11 views21 pages

Digital Image Processing Overview

Digital Image Processing Unit 1

Uploaded by

cricketholythe
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)
11 views21 pages

Digital Image Processing Overview

Digital Image Processing Unit 1

Uploaded by

cricketholythe
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

UNIT - I

INTRODUCTION TO DIGITAL IMAGE PROCESSING,IMAGE SENSING &


ACQUISITION

1 a) State the purpose of the image processing. List out the fundamental [L1][CO1] [6M]
steps in digital image processing which can be applied to images.

Image processing is often viewed as arbitrarily manipulating an image to achieve an aesthetic


standard or to support a preferred reality. However, image processing is more accurately defined as a
means of translation between the human visual system and digital imaging devices. The human
visual system does not perceive the world in the same manner as digital detectors, with display
devices imposing additional noise and bandwidth restrictions. Salient differences between the
human and digital detectors will be shown, along with some basic processing steps for achieving
translation. Image processing must be approached in a manner consistent with the scientific method
so that others may reproduce, and validate, one's results. This includes recording and reporting
processing actions, and applying similar treatments to adequate controlimages.

The fundamental steps in digital image processing includes:

Image acquisition is the first process shown in Figure below Note that acquisition could be as
simple as being given an image that is already in digital form. Generally, the image acquisition stage
involves preprocessing, such as scaling.
Image enhancement is among the simplest and most appealing areas of digital image processing.
Basically, the idea behind enhancement techniques is to bring out detail that is
obscured, or simply to highlight certain features of interest in an image.
Image restoration is an area that also deals with improving the appearance of an image. However,
unlike enhancement, which is subjective, image restoration is objective, in the sense that restoration
techniques tend to be based on mathematical or probabilistic models of image degradation.
Color image processing is an area that has been gaining in importance because of the significant
increase in the use of digital images over the Internet.
Wavelets are the foundation for representing images in various degrees of resolution. Compression,
as the name implies, deals with techniques for reducing the storage required to save an image, or the
bandwidth required to transmit it. Although storage technology has improved significantly over the
past decade, the same cannot be said for transmission capacity. Morphological processing deals
with tools for extracting image components that are useful in the representation and description of
shape.

Segmentation procedures partition an image into its constituent parts or objects. In general,
autonomous segmentation is one of the most difficult tasks in digital image processing.
Representation and description almost always follow the output of a segmentation stage, which
usually is raw pixel data, constituting either the boundary of a region (i.e., the set of pixels
separating one image region from another) or all the points in the region itself. Regional
representation is appropriate when the focus is on internal properties, such as texture or skeletal
shape. Description, also called feature selection, deals with extracting attributes that result in some
quantitative information of interest or are basic for differentiating one class of objects

b) Define image processing. Illustrate example fields of its usage. [L2][CO1] [6M]
An image may be defined as a two-dimensional function, f(x, y), where x and y are spatial (plane)
coordinates, and the amplitude of f at any pair of coordinates (x, y) is called the intensity or gray level of the
image at that point. • When x, y, and the amplitude values of f are all finite, discrete quantities, we call the
image a digital image. • The field of digital image processing refers to processing digital images by means of
a digital computer.
1) Image sharpening and restoration
It refers to the process in which we can modify the look and feel of an image. It basically
manipulates the images and achieves the desired output. It includes conversion, sharpening,
blurring, detecting edges, retrieval, and recognition of images.

2) Medical Field

There are several applications under medical field which depends on the functioning of digitalimage
processing.

o Gamma-ray imaging
o PET scan
o X-Ray Imaging
o Medical CT scan
o UV imaging3)

Robot vision

There are several robotic machines which work on the digital image processing. Through image
processing technique robot finds their ways, for example, hurdle detection root and line followerrobot.

4) Pattern recognition

It involves the study of image processing, it is also combined with artificial intelligence such that
computer-aided diagnosis, handwriting recognition and images recognition can be easily
implemented. Now a days, image processing is used for pattern recognition.

5) Video processing
It is also one of the applications of digital image processing. A collection of frames or pictures are
arranged in such a way that it makes the fast movement of pictures. It involves frame rate conversion,
motion detection, reduction of noise and colour space conversion etc. from another.
Recognition is the process that assigns a label (e.g., “vehicle”) to an object based on its descriptors.
We conclude our coverage of digital image processing with the development of methods for
recognition of individual objects.

2 a) Discuss the three principal sensor arrangements used to transform [L2][CO1] [6M]
illumination energy into digital images.

Most of the images are generated by the combination of an “illumination” source and the
reflection or absorption of energy from that source by the elements of the “scene” being
imaged.
• Three principal sensor arrangements used to transform illumination energy into digital images.
(a) Single imaging sensor.
(b) Line sensor.
(c) Array sensor.
• Incoming energy is transformed into a voltage by the combination of input electrical power and
sensor material.
• The output voltage waveform is the response of the sensor(s), and a digital quantity is obtained
from each sensor by

digitizing its response

Image Acquisition Using a Single Sensor •

The most familiar sensor of this type is the photodiode, which is constructed of silicon materials and whose
output voltage waveform is proportional to light.
• The use of a filter in front of a sensor improves selectivity.
• To generate a 2-D image using a single sensor, there has to be relative displacements in both the x- and y-
directions between the sensor and the area to be imaged.

Image Acquisition Using Line Sensor Strips


• The strip provides imaging elements in one direction
. • This is the type of arrangement used in most flat bed scanners.
• Sensing devices with 4000 or more in-line sensors are possible.
• In-line sensors are used in airborne imaging applications, in which the imaging system is mounted on an
aircraft that flies at a constant altitude and speed over the geographical area to be imaged.
• Lenses or other focusing schemes are used to project the area to be scanned onto the sensors.
• Sensor strips mounted in a ring configuration are used in medical and industrial imaging to obtain cross-
sectional (“slice”) images of 3-D object
Image Acquisition Using Sensor Arrays •
Numerous electromagnetic and some ultrasonic sensing devices frequently are arranged in an array format. • This
is also the predominant arrangement found in digital cameras.
• A typical sensor for these cameras is a CCD array.
• CCD sensors are used widely in digital cameras and other light sensing instruments.
b) List out the applications of digital image processing. [L1][CO1] [6M]
4) Some of the major fields in which digital image processing is widely used are
mentioned below
1. Gamma Ray Imaging- Nuclear medicine and astronomical observations.
2. X-Ray imaging – X-rays of body.
3. Ultraviolet Band –Lithography, industrial inspection, microscopy, lasers.
4. Visual And Infrared Band – Remote sensing.
5. Microwave Band – Radar imaging
6. Image sharpening and restoration
7. Medical field
8. Remote sensing
9. Transmission and encoding
10. Machine/Robot vision
11. Color processing
12. Pattern recognition
13. Video processing
Microscopic Imaging
3 a) Discuss the method of image sensing and acquisition along with [L2][CO1] [6M]
suitable diagrams.
The term image acquisition refers to the process of capturing real-world images and storing them into a computer.
Conventional silver-based photographs in the form of negatives, transparencies or prints can be scanned using a
variety of scanning devices. Digital cameras which capture images directly in digital form are more popular
nowadays. Films are not used in digital cameras. Instead, they use a charge-coupled device or CMOS device as
the image sensor that converts light into electrical charges.

Image-Sensor
Some of the definitions of the most commonly used terms in solid-state image sensors are given below:
(i) Charge-coupled Device (CCD) CCD is a charge-transfer device that collects light in pixels and then
uses clock pulses to shift the charge along a chain of pixels.
(ii) Dark Current The charge of the signal collected by the pixel in the absence of light is termed dark
current.
(iii) Photo Site Photo site is the portion of the silicon that functions as a light-sensitive area.
(iv) Pixel Pixel is a discrete photosensitive cell that collects and holds a photo charge
(v) Fill Factor A pixel is divided into a sensing portion and a read-out portion. Fill factor is the ratio of
the sensing area to the total area.

(vi) Quantum Efficiency Quantum efficiency is the ratio of the photon-generated electrons that the pixel
captures to the photons incident on the pixel area

b) Calculate the number of bits required to store a digitized image if [L3][CO1] [6M]
image sizes are 8×8, 32×32 for 8-bit pixel depth.

The [Link] bits required to store a digitized image is

b = M *N*K L=2𝐾
when M=N the above equation becomes
b = 𝑁2 *K
32 bit : 256 bit:
N=32 , L=32 , K=5 N=32 , L=32 , K=5
e b =32*32*5=5120 bits b=256*256*8=524288 bits

64 bit: N=64,L=64 ,K=6


b = 64*64*6=24576 bits
128 bit:

N=128,L=128 ,K=7
b = 128*128*7=1146888 bits
4 a) Explain about image sampling and quantization process with proper [L2][CO1] [8M]
steps.

IMAGE SAMPLING AND QUANTIZATION:


The output of most sensors is a continuous voltage waveform whose amplitude and spatial
behavior are related to the physical phenomenon being sensed. To create a digital image, we
need to convert the continuous sensed data into digital form. This involves two processes:
sampling and quantization.
BASIC CONCEPTS IN SAMPLING AND QUANTIZATION:
The basic idea behind sampling and quantization is illustrated in Fig.6.1. Figure 6.1(a)
shows a continuous image, f(x, y), that we want to convert to digital form. An image may be
continuous with respect to the x- and y-coordinates, and also in amplitude. To convert it to
digital form, we have to sample the function in both coordinates and in amplitude. Digitizing
the coordinate values is called sampling. Digitizing the amplitude values is called
quantization.
The one-dimensional function shown in Fig.6.1 (b) is a plot of amplitude (gray level)
values of the continuous image along the line segment AB in Fig. 6.1(a).The random
variations are due to image noise. To sample this function, we take equally spaced samples
along line AB, as shown in Fig.6.1 (c).The location of each sample is given by a vertical
tick mark in the bottom part of the figure. The samples are shown as small white squares
superimposed on the function. The set of these discrete locations gives the sampled
function. However, the values of the samples still span (vertically) a continuous range of
gray-level values. In order to form a digital function, the gray-level values also must be
converted (quantized) into discrete quantities.

Fig. Generating a digital image (a) Continuous image (b) A scan line from A to Bin the
continuous image, used to illustrate the concepts of sampling and quantization (c) Sampling
and quantization. (d) Digital scan line
An image may be continuous with respect to the x- and y-coordinates, and also in amplitude.
To convert it to digital form, we have to sample the function in both coordinates and in
amplitude. Digitizing the coordinate values is called sampling. Digitizing the amplitude
values is called quantization.
Sampling in the manner just described assumes that we have a continuous image in both
coordinate directions as well as in amplitude. In practice, the method of sampling is
determined by the sensor arrangement used to generate the image. When an image is
generated by a single sensing element combined with mechanical motionMechanical motion in
the other direction can be controlled more accurately, but it makes little sense to try to achieve
sampling density in one direction that exceeds the sampling limits established by the number of
sensors in the other. Quantization of the sensor outputs completes the process of generating a
digital image.

Fig.6.2. (a) Continuos image projected onto a sensor array (b) Result of
imagesampling and quantization

b) Discuss the method for representation of a digital image. [L2][CO1] [4M]

We will use two principal ways to represent digital images. Assume that an image f(x, y) is
sampled so that the resulting digital image has M rows and N columns. The values of the
coordinates (x, y) now become discrete quantities. For notational clarity and convenience,
we shall use integer values for these discrete coordinates. Thus, the values of the
coordinates at the origin are (x, y) = (0, 0). The next coordinate values along the first row
of the image are represented as (x, y) = (0, 1). It is important to keep in mind that the
notation (0, 1) is used to signify the second sample along the first row. It does not mean
that these are the actual values of physical coordinates when the image was sampled.
Fig: Coordinate convention used to represent digital images

The notation introduced in the preceding paragraph allows us to write the complete M*N
digital image in the following compact matrix form:

The right side of this equation is by definition a digital image. Each element of this matrix
array is called an image element, picture element, pixel, or pel.

5 a) Discuss the classification of digital images and image types. [L2][CO1] [6M]

b) Explain the neighbors of a pixel with suitable example. [L3][CO1] [6M]

Neighbors of a Pixel:

A pixel p at coordinates (x, y) has four horizontal and vertical neighbors whose coordinates are
given by (x+1, y), (x-1, y), (x, y+1), (x, y-1). This set of pixels, called the 4-neighbors of p, is
denoted by N4 (p). Each pixel is a unit distance from (x, y), and some of the neighbors of p lie
outside the digital image if (x, y) is on the border of the image.
The four diagonal neighbors of p have coordinates (x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1) and are denoted by
ND (p). These points, together with the 4-neighbors, are called the 8- neighbors of p, denoted by N8 (p). As before,
some of the points in ND (p) and N8 (p) fall outside the image if (x, y) is on the border of the image

6 a) Illustrate about the adjacency, connectivity, regions and boundaries. [L2][CO1] [6M]
Connectivity:

Connectivity between pixels is a fundamental concept that simplifies the definition of 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 levels satisfy a specified criterion of similarity (say, if
their gray levels are equal).
For instance, in a binary image with values 0 and 1, two pixels may be 4-neighbors, but they are said to
be connected only if they have the same value. Let V be the set of gray-level 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, the idea is the same, but set V typically contains more elements. For example, in the
adjacency of pixels with a range of possible gray-level values 0 to 255, set V could be any subset of
these 256 values.

We consider three types of adjacency:


(a) 4-adjacency. Two pixels p and q with values from V are 4-adjacent if q is in the set N4 (p).
(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 (i) q is in
N4 (p), or (ii) q is in ND (p) and the set has no pixels whose values are from V. Mixed adjacency is a
modification of 8-adjacency.
It is introduced to eliminate the ambiguities that often arise when 8-adjacency is used. For example,
consider the pixel arrangement shown in Fig.9 (a) for V= {1}.The three pixels at the top of Fig.9 (b)
show multiple (ambiguous) 8- adjacency, as indicated by the dashed lines. This ambiguity is removed
by using m-adjacency, as shown in Fig. 9 (c).Two image subsets S1 and S2 are adjacent if some pixel in
S1 is adjacent to some pixel in S2. It is understood here and in the following definitions that adjacent
means 4-, 8-, or m-adjacent. . A (digital) path (or curve) from pixel p with coordinates (x, y) to pixel q with
coordinates (s, t) is a sequence of distinct pixels with coordinates

where and pixels are adjacent for

. In this case, n is the length of the path. If (xo, yo) = (xn, yn), the path is a closed path. We can
define 4-, 8-, or m-paths depending on the type of adjacency specified. For example, the paths shown in Fig.
9 (b) between the northeast and southeast points are 8-paths, and the path in Fig. 9 (c) is an m-path. Note the
absence of ambiguity in the m-path. 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. For any pixel p in S, the set of pixels that are
connected to it in S is called a connected component of S. If it only has one connected component, then set S
is called a connected set.

Let R be a subset of pixels in an image. We call R a region of the image if R is a connected set. The
boundary (also called border or contour) of a region R is the set of pixels in the region that have one or more
neighbors that are not in R. If R happens to be an entire image (which we recall is a rectangular set of
pixels), then its boundary is defined as the set of pixels in the first and last rows and columns of the image.
This extra definition is required because an image has no neighbors beyond its border. Normally, when we
refer to a region, we are referring to a subset

Fig. (a) Arrangement of pixels; (b) pixels that are 8-adjacent (shown dashed) to the center pixel; (c) m-
adjacency
b) Let V = {1}, Compute the 4-adjacency, 8-adjacency and different paths [L3][CO1] [6M]
between two pixels (1,1) and (3,3) for the center pixel in the given image.

1 4 7
𝐴 = [2 1 1 ]
3 1 9

7 a) Discuss about the distance measures of a pixel with suitable example. [L2][CO1] [6M]
Distance Measures:

For pixels p, q, and z, with coordinates (x, y), (s, t), and (v, w), respectively, D is a distance
function or metric if

The Euclidean distance betw een p and q is defined as


For this distance measure, the pixels having a distance less than or equal to some value r from(x,
y) are the points contained in a disk of radius r centered at (x, y).

The D4 distance (also called city-block distance) between p and q is defined as

In this case, the pixels having a D4 distance from (x, y) less than or equal to some value r form
a diamond centered at (x, y). For example, the pixels with D4 distance ≤ 2 from (x, y) (the center
point) form the following contours of constant distance:

The pixels with D4 =1 are the 4-neighbors of (x, y).

The D8 distance (also called chessboard distance) between p and q is defined as

In this case, the pixels with D8 distance from(x, y) less than or equal to some value r form a
square centered at (x, y). For example, the pixels with D 8 distance ≤ 2 from(x, y) (the center
point) form the following contours of constant distance:
The pixels with D8=1 are the 8-neighbors of (x, y). Note that the D4 and D8 distances between
p and q are independent of any paths that might exist between the points because these distances
involve only the coordinates of the points. If we elect to consider m-adjacency, however, the Dm
distance between two points is defined as the shortest m-path between the points. In this case,
the distance between two pixels will depend on the values of the pixels along the path, as well
as the values of their neighbors. For instance, consider the following arrangement of pixels and
assume that p, p2 , and p4 have value 1 and that p1 and p3 can have a value of 0 or 1:

Suppose that we consider adjacency of pixels valued 1 (i.e. = {1}). If p1 and p3 are 0, the length
of the shortest m-path (the Dm distance) between p and p4 is 2. If p1 is 1, then p2 and p will no
longer be m-adjacent (see the definition of m-adjacency) and the length of the shortest m-path
becomes 3 (the path goes through the points pp1p2p4). Similar comments apply if p3 is 1 (and
p1 is 0); in this case, the length of the shortest m-path also is 3. Finally, if both p1 and p3 are 1
the length of the shortest m-path between p and p4 is 4. In this case, the path goes through the
sequence of points pp1p2p3p4.

b) Demonstrate the Arithmetic operations on digital images with [L2][CO1] [6M]


relevant expressions.

Arithmetic operations between two images f (x, y) and g(x, y) are denoted as
These are element wise operations which, as noted earlier in this section, means that they are
performed between corresponding pixel pairs in f and g for x = 0, 1, 2,…,M − 1 and y = 0, 1, 2,…,
N − 1. As usual, M and N are the row and column sizes of the images. Clearly, s, d, p, and v are
images of size M × N also. Note that image arithmetic in the manner just defined involves images
of the same size.
8 a) List out the applications of image subtraction and image [L2][CO1] [6M]
multiplication.

Image Subtraction for Comparing Images


The important application of the subtraction operation is finding differences between two images.

If the input images are the same at a given pixel location, they have the same value and the
grayscale value of the difference image will be zero (black) at that location. However, the
differences will lead to a non-zero output value and can be easily recognized
Image Subtraction for Correcting Uneven Illuminance
Image Averaging for Noise Reduction
Applications in Motion Detection Algorithms
This simple observation is the basis for several motion detection algorithms. These algorithms capture
a sequence of images from the same scene at different times and use the subtraction operator to detect
changes.
It is worthwhile to mention that motion detection is a challenging problem and a wide variety of
algorithms for different applications are discussed in the literature. If you're interested in this concept,
In practice, the similar regions of the images that are compared by the subtraction operation may not
have exactly the same grayscale value. For example, the illumination variation from one capture to the
other can lead to slightly different pixel values even in similar regions. Therefore, we might need to
find an appropriate threshold value in order to determine whether or not a given output pixel value
represents a difference between the input images.
b) Explain the Linear versus Nonlinear operations on digital images with [L2][CO1] [6M]
relevant equations.

a) Linear Versus Nonlinear Operations


One of the most important classifications of an image processing method is whether it is linear or
nonlinear. Consider a general operator, that produces an output image, g(x, y), from a given input
image, f (x, y):
This equation indicates that the output of a linear operation applied to the sum of two inputs is the
same as performing the operation individually on the inputs and then summing the results. In
addition, the output of a linear operation on a constant multiplied by an input is the same as the
output of the operation due to the original input multiplied by that constant. The first property is
called the property of additivity, and the second is called the property of homogeneity. By definition,
an operator that fails to satisfy Eq. (2) is said to be nonlinear.

9 a) Compute the array product and matrix product for the following [L3][CO1] [6M]
two images and comment the result.
1 −1 2 −2
𝐴=[ ] and 𝐵 = [ ]
−1 1 −2 2
b) Explain the Array versus Matrix operations on digital images with [L3][CO1] [6M]
relevant equations.
a) Array & Matrix operations

An element wise operation involving one or more images is carried out on a pixel-by pixel basis.
We mentioned earlier in this chapter that images can be viewed equivalently as matrices. In fact,
as you will see later in this section, there are many situations in which operations between images
are carried out using matrix theory. It is for this reason that a clear distinction must be made
between element wise and matrix operations. For example, consider the following 2 * 2 images
(matrices):

That is, the element wise product is obtained by multiplying pairs of corresponding pixels. On the
other hand, the matrix product of the images is formed using the rules of matrix multiplication:

10 a) Demonstrate the set operation and logical operations in digital image


processing along with suitable example.
a) Set & Logical operations

Basic Set operations:


.
Figure : Venn diagrams corresponding to the set operations

Logical Operations:

Logical operations deal with TRUE (typically denoted by 1) and FALSE (typically denoted by 0)
variables and expressions. For our purposes, this means binary images composed of foreground
(1-valued) pixels, and a background composed of 0-valued pixels.

We work with set and logical operators on binary images using one of two basic approaches:

(1) we can use the coordinates of individual regions of foreground pixels in a single image as sets,
or
(2) we can work with one or more images of the same size and perform logical operations between
corresponding pixels in those arrays.

In the first category, a binary image can be viewed as a Venn diagram in which the coordinates of
individual regions of 1-valued pixels are treated as sets. The union of these sets with the set
composed of 0-valued pixels comprises the set universe, A. In this representation, we work with
single images using all the set operations defined in the previous section. For example, given a
binary image with two 1-valued regions, R1 and R2 , we can determine if the regions overlap (i.e.,
if they have at least one pair of coordinates in common) by performing the set intersection
operation R1 or R2 (see Fig. 1.15). In the second approach, we perform logical operations on the
pixels of one binary image, or on the corresponding pixels of two or more binary images of the
same size.

Logical operators can be defined in terms of truth tables, as Table 1.1 shows for two logical
variables a and b. The logical AND operation (also denoted ¿) yields a 1 (TRUE) only when both
a and b are 1. Otherwise, it yields 0 (FALSE). Similarly, the logical OR (¡) yields 1 when both a
or b or both are 1, and 0 otherwise. The NOT (-) operator is self explanatory. When applied to two
binary images, AND and OR operate on pairs of corresponding pixels between the images. That
is, they are elementwise operators (see the definition of elementwise operators given earlier in this
chapter) in this context. The operators AND, OR, and NOT are functionally complete, in the sense
that they can be used as the basis for constructing any other logical operator.

Figure illustrates the logical operations


b) Compute the image addition, image subtraction and image [L3][CO1] [6M]
multiplication operation for the following images.
1 −1 2 −2
𝑓(𝑥, 𝑦) = [ ] and 𝑔(𝑥, 𝑦) = [ ]
−1 1 −2 2

You might also like