Just for Fun
•Rods vs. Cones Showdown: If rods and cones had a friendly wrestling
match, who do you think would win under a dim light and why?
• Cone-tastic Colors: Cones let you see color, but if they decided to "strike"
and only showed one color, which would you pick and why?
• Superhero Rods and Cones: If rods and cones were superheroes, what
would their superpowers and weaknesses be?
Steps in imageformation 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
Spatial and IntensityResolution
• Spatial –smallest detail that can be distinguished in an image.
• Line per unit distance, dots per unit distance
• Intensity-smallest detectable change in the intensity
38.
39
Effect of spatial
resolution
Source:Digital Image Processing, Gonzalez and Woods, Prentice Hall
FIGURE 2.23 Effects
of reducing spatial
resolution. The
images shown are
at: (a) 930 dpi, (b)
300 dpi, (c) 150 dpi,
and (d) 72 dpi
39.
40
Effect of intensitylevels
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
40.
Problem 2.5
• Youare preparing a report and have to insert in it an image of size 2048 *
2048 pixels.
• (a) * Assuming no limitations on the printer, what would the resolution in line
pairs per mm have to be for the image to fit in a space of size 5 * 5 cm?
• (b) What would the resolution have to be in dpi for the image to fit in 2 * 2
inches?
41.
• You arescanning a physical document that measures 8.5 × 11 inches for
archiving. The scanner allows you to set resolutions in dpi.
• (a) If you want the scanned image to have dimensions of 2550 × 3300
pixels, what dpi should you use?
• (b) If you scanned the document at 300 dpi, what would be the
dimensions of the resulting image in pixels?
42.
Basic Relationships BetweenPixels
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
43.
The fourdiagonal 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)
Adjacency
1. Two pixelsare 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,
46.
Distance Measures
• Forpixels 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).
47.
Distance Measures
• TheEuclidean 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 D8 distance (also called chessboard distance) between p and q is defined
as:
D8 (p,q) = max(| x – s |,| y – t |)
48.
Distance Measures
• Dmdistance:
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.
49.
50
Basics of intensitytransforms
• 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,y
2, where ix,y is input intensity at location (x,y) and jx,y is
output intensity; henceforth represented as s = T(r)
25/08/2025 IPMV ClassLecture 66
DIY
• Complete the table
M x N Bpp No of gray
levels
Storage size (bits)
200 x 200 2
200 x 200 4
1064 x 1064 1
100 x 100 8000
100 x 100 64
50 x 50 10
66.
25/08/2025 IPMV ClassLecture 67
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.
67.
25/08/2025 IPMV ClassLecture 68
DYI
Draw the iso-preference curve for the following data
Bpp 4 5 6 7 8 9 10 11 12
N 3
2
6
4
1
2
8
3
2
6
4
1
2
8
3
2
6
4
1
2
8
3
2
6
4
1
2
8
3
2
6
4
1
2
8
3
2
6
4
1
2
8
3
2
6
4
1
2
8
3
2
6
4
1
2
8
3
2
6
4
1
2
8
Quality
Rating
B B G B B G B B G B B G B G G B G G B G G B G G G G G
• Write downthe 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