chapter 1

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 61

Module 1: DIGITAL IMAGE

FUNDAMENTALS AND POINT


PROCESSING
Binary images
• Binary images take only two values either 0 or 1

Type of Images
Gray scale images

• contains only brightness information

Type of Images
Colored images
• three values per pixel and they
measure intensity and chrominance
of light

Type of Images
Computer generated images

Type of Images
Natural Images

Type of Images
Cartoon like images

Type of Images
Examples of X-ray
images

Type of Images
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Examples of UV images of healthy and
diseased corn

Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall Type of Images
Examples of microscopy
images

Type of Images

Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall


Thematic bands of LANDSAT
satellite

Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall


Same area pictured with different bands

Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall Type of Images
Photography using ultrasound

Type of Images
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Steps in image formation and processing
1. Energy source
2. Intervening medium
3. Reflection or refraction through the object
4. Interveneing medium
5. Optics or other focusing mechanism
6. Sensing mechanism
7. A/D conversion
8. Compression (IP software)
9. Storage
10. Decompression (IP Software)
11. Other image processing software
Most used images
Images that need processing
Structure of the human eye

Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall


17
18
Webber’s ratio

19
Webber’s Ratio:

20
21
22
Image Sampling and Quantization

23
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Sampling and quantization

24
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Sampling and quantization

25
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Surfaces and contours of intensity

Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall


26
27
When pixel intensities are outside the range
represented

28
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Effect of intensity
levels

29
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Effect of spatial resolution
Effects of
reducing spatial
resolution. The
images shown
are at:
(a) 930 dpi,
(b) 300 dpi,
(c) 150 dpi, and
(d) 72 dpi.

30
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
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 N 4(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.
(x-1, y+1) (x+1, y-1)
P (x,y)
(x-1, y-1) (x+1, y+1)
Basic Relationships Between Pixels
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 4-neighbors and have same value
(0/1).

Let V be set of gray levels values used to define adjacency.

3. 4-adjacency: Two pixels p and q with values from V are 4-adjacent if q is in the set N4(p).

4. 8-adjacency: Two pixels p and q with values from V are 8- adjacent if q is in the set N8(p).

5. 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).


A Digital Path
• A digital path (or curve) from pixel p with coordinate (x,y) to pixel
q with coordinate (s,t) is a sequence of distinct pixels with
coordinates (x0,y0), (x1,y1), …, (xn, yn) where (x0,y0) = (x,y) and (xn,
yn) = (s,t) and pixels (xi, yi) and (xi-1, yi-1) are adjacent for 1 ≤ i ≤ n
• n is the length of the path
• If (x0,y0) = (xn, yn), the path is closed.
• We can specify 4-, 8- or m-paths depending on the type of
adjacency specified.
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.
Distance Measures
• For pixels p, q and z, with coordinates (x,y), (s,t) and (v,w),
respectively, D is a distance function if:
(a) D (p,q) ≥ 0 (D (p,q) = 0 iff p = q),
(b) D (p,q) = D (q, p), and
(c) D (p,z) ≤ D (p,q) + D (q,z).
Distance Measures
• The Euclidean Distance between p and q is defined as:
De (p,q) = [(x – s)2 + (y - t)2]½
• The D4 distance (also called city-block distance) between p and q is defined
as:
D4 (p,q) = | x – s | + | y – t |
• The D distance (also called chessboard distance) between p and q is defined
8

as:
D (p,q) = max(| x – s |,| y – t |)
8
Distance Measures
• Dm distance:
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.
Basics of intensity transforms
• Definition: a function that maps an input pixel
intensity to an output pixel intensity

• Purpose:
– Improve the (subjective) visual quality of an image
– Sometimes, it also helps downstream algorithms

• Example: jx,y = 3 ix,y2, where ix,y is input intensity at


location (x,y) and jx,y is output intensity; henceforth
represented as s = T(r)
40
Contrast stretching and thresholding

41
Contrast stretching vs. thresholding

42
Highlighting a range of
intensities

43
Negative of an image

S=L- r − 1

44
EX: Obtain the digital negative of the following 8 - bit sub image.
UQP: (May 17) 10 Marks
Some basic intensity
transformations

47
Log transformation in log domain
• s = c log (1+r)

48
Power-law (gamma transformation)

• s = c rγ

49
Gamma
1, .6, .4, .3

51
Gamma 1, 3, 4,
5

52
Some results of intensity highlighting

53
Bit-plane slicing
DIY
• Complete the table
MxN Bpp No of gray Storage size (bits)
levels

200 x 200 2

200 x 200 4

1064 x 1064 1

100 x 100 8000

100 x 100 64

50 x 50 10

15/07/2024 IPMV Class Lecture 56


DIY
For the following image matrix

What is the maximum number of gray level value possible?


Plot possible gray levels on the x-axis and plot no of pixels having that
gray level on y-axis.

15/07/2024 IPMV Class Lecture 57


DYI
Draw the iso-preference curve for the following data

Bpp 4 5 6 7 8 9 10 11 12

N 3 6 1 3 6 1 3 6 1 3 6 1 3 6 1 3 6 1 3 6 1 3 6 1 3 6 1
2 4 2 2 4 2 2 4 2 2 4 2 2 4 2 2 4 2 2 4 2 2 4 2 2 4 2
8 8 8 8 8 8 8 8 8
Quality B B GB B GB B G B B G B G G B G G B G G B G G G G G
Rating

15/07/2024 IPMV Class Lecture 58


TIY
• Can Histogram be the signature of an image?

15/07/2024 IPMV Class Lecture 59


• Write down the coordinates of 5 * 5 image
• For the above image write the value of Euclidean distance, city block
distance and chess board distance for every pixel to centre pixel
What not to do

You might also like