Unit-I: Digital Image Fundamentals & Image Transforms
Unit-I: Digital Image Fundamentals & Image Transforms
2
What is Digital Image Processing?
An image is 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 of the image at that point.
When x, y and the amplitude 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 using computers.
A digital image consists of a finite number of elements, each
of which has a particular location and value.
The elements are referred as picture elements, image
elements, pels and pixels.
Machines vs humans
Among the five senses, vision is considered to
be vital one for a human being.
But a human being can perceive only visible
part of the electromagnetic spectrum.
But machines can span the entire range of
electromagnetic spectrum from gamma to
radio waves.
Image vision vs Image analysis
Image processing is a branch in which both
the input and output of a process are images.
The goal of computer vision is to use
computers to emulate human vision, including
learning, making inferences and taking
actions.
The area of image analysis is in between
image processing and computer vision.
The Origin of Digital Image Processing
6
• Figure was transmitted in this way and reproduced on
a telegraph printer fitted with typefaces simulating a
halftone pattern.
7
• The printing based on photographic
reproduction
technique made tapes perforated at the
telegraph
from receiving terminal from 1921.
8
• The early Bartlane systems were capable of coding
images in five distinct levels of gray.
• This capability was increased to 15 levels in 1929.
9
• Figure shows the first image of the moon taken by
Ranger
10
Applications of DIP
• The field of image processing applications in
has medicine and the space program.
and 0 r ( x, y ) 1
• When M = N, b = (N^2)k
• For example, a 256 X 256 image represented with 8
bits takes 5,24,288 bits.
Dynamic Range of Images
Spatial and Gray-Level Resolution
Sampling determines the spatial resolution of
an image.
Resolution is the smallest number of
discernible line pairs per unit distance.
Gray-level resolution is the smallest
discernible change in gray level.
Zooming and Shrinking Digital Images
Zooming is viewed as oversampling and shrinking is viewed as
under sampling.
Zooming is a 2 step process: the creation of new pixel
locations and assignment of gray levels to those new
locations.
For example, say we want to zoom an image of size 500 X 500
to 750 X 750.
We can use nearest neighbor interpolation for zooming.
Pixel replication is the special case of nearest neighbor
interpolation.
Pixel replication is used to zoom the image by an integer
number of times.
Here new locations are exact duplicates of old locations.
It is very fast but produces check board effect and hence is
undesirable for larger magnification.
Shrinking an image
For shrinking an image by one-half, we delete every
other row and column.
In order to shrink an image by non integer factor, we
expand the grid to fit over the original image, do
gray-level nearest neighbor or bilinear interpolation,
and then shrink the grid back to its original specified
size. (Assignment).
It is good to blur an image slightly before shrinking it.
Image zooming using nearest neighbor gray-
level interpolation
Image size:128X128 Image size:512X512
Image size:256X256
Image Zooming using bilinear interpolation
Image size:256X256
Relationships between Pixels
Neighbors of a Pixel
A pixel p at coordinates (x,y) has 4 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 is called the 4-neighbors of p and is
denoted by N4(p). Some of the neighbors of p lie outside
the 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, along with 4-
neighbors are called 8-neighbors of p, denoted by N 8(p).
Adjacency and Connectivity
To establish if 2 pixels are connected, it must be
determined if they are neighbors and if their gray
levels satisfy a specified criterion of similarity.
For example, in a binary image, 2 pixels may be 4
neighbors but they are said to be connected only if
they have the same value.
In a gray scale image, we consider any subset of
allowed gray level values for connectivity.
3 types of adjacency
4-adjacency: Two pixels p and q with values from V
are 4 adjacent if q is in the set N4(q).
8-adjacenty: Two pixels p and q with values from V
are 8-adjacent if q is in the set N8(q).
m-adjacency: Two pixels p and q with values from
V are m-adjacent if
q is in N4(p), or
q is in ND(p) and set N4(p) ∩ N4(q) has no pixels whose
values are from V.
Digital Path
D KHALANDARBASHA
13
The eye is nearly a sphere, with an average
diameter of approximately 20mm.
14
Cornea
• The cornea is a tough, transparent tissue that covers
the anterior surface of the eye.
15
Choroid
• The choroid lies directly below the sclera.
16
• At its anterior extreme, the choroid is divided into the
ciliary body and the iris diaphragm.
17
• The lens is made up of concentric layers of fibrous
cells and is suspended by fibers that attach to the
ciliary body.
18
Retin
a
• The innermost membrane of the eye is the retina,
which lines the Inside of the ǁall’s entire posterior
portion.
19
• There are two classes of receptors: cones and rods.
20
• Muscles controlling the eye rotate the eyeball
until the image of an object of interest falls on the
fovea.
21
• Figure shows the density of rods and cones for a
cross section of the right eye passing through the
region of emergence of the optic nerve from the
eye.
22
• The absence of receptors in this area results in the
so-called blind spot.
23
Image Formation in the Eye
• The principal difference between the lens of the eye
and an ordinary optical lens is that the former is
flexible.
25
• For example, the observer is looking at a tree 15 m
high at a distance of 100 m.
26
Light and the Electromagnetic
Spectrum
• Sir Isaac Newton discovered that when a beam of
sunlight is passed through a glass prism,
• The emerging beam of light is not white but consists
instead of a continuous spectrum of colors ranging
from violet at one end to red at the other.
27
• The intensity of a monochrome image f at any
coordinates (x, y) the gray level (l) of the image at
that point.
33
GRAY SCALE
• The interval [Lmin , Lmax ] is called the gray scale.