Digital Image Processing
Digital Image Processing
Ekta Soni
Origin of Digital image processing
• The first application of digital image was in the
newspaper industry when the pictures were
first sent by submarine cable between London
and New York.
• The cable picture transmission in 1921
reduced the time required to transport a
picture across the Atlantic for more than a
week to less than 3 hours.
• Digital image is composed of a finite number
of elements, each of which has a particular
location and value. These elements are called
picture elements, image elements, pels and
pixels.
• The pixel values may represent the amount of
visible light, infra-red light, absorption of x-
rays, electrons, or any other measurable value
such as ultrasound wave impulses.
• The images may be obtained by a digital
camera, scanner, electron microscope,
ultrasound stethoscope, or any other optical or
non-optical sensor.
• Examples of digital image are Digital
photographs, Satellite images, Radiological
images (x-rays, mammograms), Binary images,
Fax images, Engineering drawings, Computer
graphics,
Types of Images
• Binary Image – The binary image contains only two pixel elements
0 & 1.
• Here, 0 refers to black and 1 refers to white. This is also known as
Monochrome.
• Black and White Image– The image contains black and white
color.
• 8 Bit Color Format – It has 256 different shades of colors and
known as Grayscale Image. In this format, 0 stands for Black, and
255 stands for white, and 127 stands for Gray.
• 16 Bit Color Format – It has different colors and is known as a High
Color Format. The distribution of Color is not the same as a
Grayscale image.
• Examples of digital image
areDigitalphotographs, Satelliteimages,
• Radiological images (x-rays, mammograms),
Binary images, Fax images, Engineering
drawings, Computer graphics.
FUNDAMENTAL STEPS IN DIGITAL IMAGE PROCESSING:
Phases/Fundamental steps Of Image Processing
• In figure (b) the paths between the top right and bottom right pixels are
8- paths. And the path between the same 2 pixels in figure (c) is m-path
•
•
• 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.
• 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.
•
• Region and Boundary:
• Region: Let R be a subset of pixels in an image, we call R a region of the
image ifRis a connected set.
• Boundary: 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
inR.
• If R happens to be an entire image, then its boundary is defined as the set of
pixels in the first and last rows and columns in the image. This extra definition
is required because an image has no neighbors beyond its borders. Normally,
when we refer to a region, we are referring to subset of an image, and any
pixels in the boundary of the region that happen to coincide with the border
of the image are included implicitly as part of the regionboundary.
•
• Distance Measures:
For pixel p,q and z with coordinate (x.y) ,(s,t) and (v,w) respectively
D is a distance function or metric if
• D [p.q] ≥ 0 {D[p.q] = 0iff p=q}
• D [p.q] = D [p.q] and
• D [p.q] ≥ 0 {D[p.q]+D(q,z) The Euclidean Distance between p and
q is definedas:
• De(p,q) = [(x – s)2 + (y - t)2]1/2
• 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 D4distance (also called city-block
distance) between p and q is definedas:
• D4(p,q) = | x – s | + | y – t |
• Pixels having a D4 distance from (x,y), less
than or equal to some value r form a Diamond
centered at (x,y)
. • Example:
• The pixels with distance D4≤ 2 from (x,y) form the following
contours of
• constant distance.
• The pixels with D4= 1 are the 4-neighbors of (x,y)
• The D8distance (also called chessboard distance) between p and q is
definedas:
DmDistance:
It 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.
• Example:
• Consider the following arrangement of pixels
and assume that p, p2, and p4 have value 1
and that p1 and p3 can have can have a value
of 0 or 1 Suppose that we consider the
adjacency of pixels values 1 (i.e. V ={1})
• Now, to compute the Dmbetween points p and
p4
• Here we have 4 cases:
• Case1: If p1 =0 and p3 = 0
• The length of the shortest m-path (the Dm
distance) is 2 (p, p2, p4)
Case2: If p1 =1 and p3 = 0
1 and p will no longer be adjacent (see m-adjacency definition) then, the length of the shortest path will be 3 (p, p1, p
3: If p1 =0 and p3 = 1
• Case4: If p1 =1 and p3 = 1
• The length of the shortest m-path will be 4 (p,
p1, p2, p3, p4)
UNIT -2
IMAGE ENHANCEMENT
• Image negative
• Log transformations
• Power law transformations
• Piecewise-Linear transformation functions
LINEAR TRANSFORMATION:
• The histogram of a digital image with gray levels in the range [0, L-1] is a discrete function of the form
• H(rk)=nk
• where rk is the kth gray level and nk is the number of pixels in the image having the level rk. A
normalized histogram is given by the equation
• P(rk)=nk/n for k=0,1,2,…..,L-1
• P(rk) gives the estimate of the probability of occurrence of gray level rk. The sum of all components of
a normalized histogram is equal to 1.
• The histogram plots are simple plots of H(rk)=nk versus rk.
•
• In the dark image the components of the histogram are concentrated on the low (dark) side of the
gray scale. In case of bright image, the histogram components are biased towards the high side of the
gray scale. The histogram of a low contrast image will be narrow and will be centered towards the
middle of the gray scale.
•
• The components of the histogram in the high contrast image cover a broad range of the gray scale.
The net effect of this will be an image that shows a great deal of gray levels details and has high
dynamic range.
HISTOGRAM EQUALIZATION: