Module -1
DIGITAL IMAGE FUNDAMENTALS
Mrs. Arti Sawant
Assistant Professor, EXTC, VESIT
Class: D14 B
Content
References
1.
Gonzales and Woods, “Digital Image Processing”, Pearson Education,
India, Third Edition
1. Chapter -1- Introduction
2. Chapter -2 –Digital Image Fundamentals
3. Chapter -6- Color Image Processing
2.Digital image processing – Ramesh Jayraman
3.Digital Image processing - Sreedhar
Fundamental Steps in Digital Image Processing
1. Image Acquisition
• To obtain the digital image of the object
2. Image Enhancement
• Enhance the image quality , remove noise and standardize image data
• e.g. sharpening of image, smoothing (filtering)
3. Image Segmentation
• Divides the image into many sub-regions and extracts the regions that are necessary for
further analysis
4. Feature Extraction and Object Description
• Identify and measure specific attributes/patterns from the image
6. Image Restoration
• Reconstruct and recover degraded image to its original form
7. Analysis and Interpretation
• Identifying and recognizing the object that is present in the image using features generated in
earlier steps
• Making decisions based on processed image
How Image Enhancement differs from Image Restoration?
• Image enhancement is subjective where restoration is objective
• Restoration techniques tend to be based on mathematical or
probabilistic modes of image degradation
• Enhancement is based on human subjective preference
regarding what constitutes a good results
Fig. Image restoration
Fig. Image enhancement
Components of an Image Processing System
Classification of Digital Images
1. Raster Image or Bitmap Image
1. Generally defined as rectangular array of regularly
sampled values known as pixels
2. Mapped to the grid & Not easily scalable
3. Resolution dependent as it contains fixed number of
pixels
4. Scanned graphics , Web Graphics
2. Vector Image :1. Vector Image made up of lines and curves that are
mathematically defined in a computer
2. Easily scalable
3. Suitable for typography, line art and illustrations
2. IMAGE TYPES:1.
2.
3.
4.
Black and White or Binary Images
Grayscale images
Color Images
Multispectral Images
1. Black and White or Binary Images :• Binary images take only two values
either 0 or 1
2. Grayscale images
1. Grayscale
image
contains
only
brightness
information
2. Each pixel value corresponds to amount of quantity
light
3. Brightness graduation can be differentiated in a
grayscale image.
4. Each pixel is represented
by a byte or word
3. Color Images
• It has three values per pixel and they measure
intensity and chrominance of light
• Each pixel is vector of color component
• Actual information stored in digital data is
brightness information in each spectral band
• Models:- RGB, HIS, CMYK
4. Multispectral image
• Multispectral images are different images taken in
different bands of visible or infrared regions of the
electromagnetic spectrum
Elements of Visual Perception
Light and the Electromagnetic Spectrum
Image Sensing and Acquisition
Single Sensor
Line Sensor
Array Sensor
Image Acquisition using single sensor
Combining a
single sensor with
motion to
generate a 2-D
image.
Image Acquisition using sensor Strips
Image Acquisition using sensor Array
Image Sampling and Quantization
1. Digitizing the co-ordinate values is called sampling
2. Digitizing the amplitude values is called quantization
Image Sampling and quantization
Image Sampling and quantization
Spatial & Intensity Resolution
1. Spatial Resolution
Spatial resolution is a measure of smallest discernible detail in an
image.
1. Largest number of discernible line pairs per unit distance
2. Quantitatively spatial resolution can be stated in number of
ways with line pairs per unit distance and dots per unit
instance.
3. Chart contains alternating black and white line, (width W
units) . The width of line pair is 2W. And 1/2W line pairs per
unit distance
4. Example :- Width of line is 0.1 mm , 5 pairs per unit distance
5. DPI :- News paper -75,
Magazine -133,
glossy broucher-175 and
Books -2400
Spatial & Intensity Resolution
2. Intensity Resolution:
• The smallest discernible change in intensity level —stated with
8 bits, 12 bits, 16 bits, etc.
• Stated as 8 bits, 12 bits, 16 bits, etc
Intensity Resolution
Intensity Resolution
Intensity Resolution
Spatial and Intensity Resolution
K- Intensity Resolution
N – Spatial Resolution
Image Interpolation
1. Its basically image re-sampling method
2. Used for zooming, shrinking , Rotation and geometric
corrections.
3. Interpolation is process of using known data to
estimate the values of unknown locations. There are
three types
1. Nearest neighbor Interpolation
2. Bilinear Interpolation
3. Bi-cubic Interpolation
Image Interpolation
Basic Relationships Between Pixels
⮚ Neighbors of a Pixel :- Any pixel p(x, y) has two vertical and two
horizontal neighbors, given by
(x+1, y), (x-1, y), (x, y+1), (x, y-1)
1. This set of pixels are called the 4-neighbors of P, and is denoted
by N4(P).
2. Each of them are at a unit distance from P
⮚ The four diagonal neighbors of p(x,y) are given by
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1 ,y-1)
1. This set is denoted by ND(P).
2. Each of them are at Euclidean distance of 1.414 from P.
⮚ The points ND(P) and N4(P) are together known as 8-neighbors of the point
P, denoted by N8(P
⮚ Some of the points in the N4, ND and N8 may fall outside image when P lies
on the border of image.
Basic Relationships Between Pixels
N4 - 4-neighbors
ND- diagonal neighbors
N8 - 8-neighbors (N4 U ND)
Adjacency
1.
Two pixels are connected if they are neighbors and their gray levels satisfy
some specified criterion of similarity.
2. For example, in a binary image two pixels are connected if they are 4neighbors and have same value (0/1).
Let V be set of gray levels values used to define adjacency.
1. 4-adjacency: Two pixels p and q with values from V are 4-adjacent if q is in
the set N4(p).
2. 8-adjacency: Two pixels p and q with values from V are 8- adjacent if q is
in the set N8(p).
3. m-adjacency: Two pixels p and q with values from V are m-adjacent
if,
1. q is in N4(P).
2. q is in ND(p) and the set [
] is empty
(has no pixels whose values are from V).
Adjacency
To determine whether the pixels are
adjacent in some sense.
Let V be the set of gray-level values
used to define connectivity; then Two
pixels p, q that have values from the set
V are:
a. 4-connected, if q is in the set N4(p)
b. 8-connected, if q is in the set N8(p)
c. m-connected, iff
Adjacency/Connectivity
1. Pixel p is adjacent to pixel q if
they are connected.
2. Two image subsets S1 and S2 are
adjacent if some pixel in S1 is
adjacent to some pixel in S2
Distance measures
Distance measures
Distance measures
Distance measures
Color Image Processing
Color spectrum seen by passing white light through a prism
Wavelengths comprising the visible range of the
electromagnetic spectrum
Absorption of light by the red, green, and blue cones
in the human eye as a function of wavelength
Primary and
secondary colors
of light and
pigments.
Chromacity Diagram
Color Models
RGB Color Model
RGB Color Model
Generating
the RGB image of
the cross-sectional
color plane
The
three hidden
surface planes in
the color cube
The HSI Color Model
The HSI Color Model
Converting colors
RGB to HSI
Point Processing Operation
• Image enhancement is the process of adjusting digital images
so that the results are more suitable for display or further
image analysis
• Two broad categories: Spatial method and Frequency method
• Point processing operations deals with pixel intensity values
individually
• Enhancement at any point in image is depend only on gray
level at that point referred to ‘point processing’
• Given by, g(x,y) = T[ f(x,y)]
• Here, T is referred as gray level transformation/ point
processing operation
• f(x,y) - input image and g(x,y) - Transformed image
Contd.
• Mask: It is a small matrix used to transform pixel to new
value
• Techniques for point processing:
i. Image negative
ii. Log transform
iii. Power law transform
iv. Contrast stretching
Negative transformation
• Negative imaging useful for enhancing white or grey detail
embedded in dark regions of an image
• It exchanges dark values with light values and vice versa
• Given by, s = L-1-r
• where, negative image intensity levels in range of [0,L-1]
• L-1 = Maximum pixel value
• r= pixel value of image
Log transformation
• It is used to expand values of dark pixels and
compress values of bright pixels
• It maps narrow range of low level grayscale
intensities into wider range of output values
• Also maps wide range of high level grayscale
intensities into narrow range output values
• It is defined as; s = c log(r+1)
• where, s - pixel value of output image
• r - pixel value of input image
• c - constant
Note- Value 1 is added to each pixel before transformation, as if
any value is 0 then log (0) is infinity.
Power Law transformation
• It is used for enhancing images for different types of display
devices
• Given by, s = c.r^γ
• where, s - output pixel
• r- input pixel
• γ - real number
• Variation in gamma value varies the enhancement of the
image. Also called as Gamma Correction
• Difference between log transform and power Law transform
is using power law function a group of possible
transformation curves can be obtained just by varying γ
Contd.
Example
Piecewise Linear Transformation
Functions
There are three piecewise linear transformation
functions:
1. Contrast stretching
2. Intensity level slicing
3. Bit plane slicing
Contrast stretching
• It expands the range of intensity levels of image
• It is difference between darker intensity and brighter intensity
values
• Different ways to do it;
- Multiplying each input pixel intensity value with constant
scalar
- Using histogram equivalent
- Applying transform which makes dark portion darker by
assigning slope of <1 and bright portion brighter by assigning
slope of >1
Bit Plane Slicing
● Intensity of each pixel in a 256-level gray-scale image is composed of 8bits
● Instead of highlighting intensity-level ranges, highlight contribution of
each pixel to total image
● Where plane 1 contains lowest order bits from all pixels and plane 8
contains highest order bits from all pixels
Example
Intensity level slicing
● Highlighting and enhancing specific range of intensities in and image,
called as intensity level slicing.
● Approach 1- To display in one value all the values in the range of interest
and in another all other intensities
● Approach 2- Brightens or darken the desired range of intensities but
leaves all other intensity levels in the image unchanged
Histogram
● Histogram of a digital image with intensity levels in the range [0,L1] is a discrete function h(rk) = nk, where rk= kth intensity value
and nk is the number of pixels in the image with intensity rk.
● To normalize a histogram by dividing each of its components by
the total number of pixels in the image, denoted by the product MN
● where, M- no. of rows and N- no. of columns
● Hence, normalized histogram;
p(rk) = nk/ MN : for k = 0,1,2…L-1
Dark image
Average contrast
image
Brighter image
Histogram Equalization
● Normalized histogram : p(rk) = nk/n
● Sum of all components = 1
● Histogram equalization results are similar to contrast
stretching, but offers the advantage of full automation
● HE automatically determines new transformation function to
produce new image with a uniform histogram
Cont.
● where, rk = k th intensity level
● n = number of total pixels
● pk = probability of k th pixel
● nk = number of pixels for k- intensity level
Example
Original Image
Image after
histogram equalization
Histogram equalization
for dark image
Histogram equalization
for brighter
Histogram equalization
for low contrast image