Module 1: DIGITAL IMAGE FUNDAMENTALS AND
POINT PROCESSING
syllabus
Type of Images
Binary images
• Binary images take only two values either 0 or 1
Gray scale images
Type of Images
• contains only brightness information
Colored images
Type of Images
• three values per pixel and they
measure intensity and chrominance
of light
Computer generated images
Type of Images
Natural Images
Type of Images
Cartoon like images
Type of Images
Examples of X-ray images
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Type of Images
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
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Type of Images
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
Most used images
Images that need processing
Identify the type of image
• A) Binary Image
• B) Natural Image
• C) Cartoon Image
• D) Computer-Generated Image
Which of the following images is not a natural image?
20
Structure of the human eye
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
22
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?
25
Webber’s ratio
26
Webber’s Ratio:
27
28
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
30
Image Sampling and Quantization
31
Sampling and quantization
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
32
Sampling and quantization
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
33
Surfaces and contours of intensity
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
34
35
When pixel intensities are outside the range
represented
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Dynamic range
Spatial and Intensity Resolution
• 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
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
40
Effect of intensity levels
Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
Problem 2.5
• You are 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?
• You are scanning 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?
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.
(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,
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 D8 distance (also called chessboard distance) between p and q is defined
as:
D8 (p,q) = max(| x – s |,| y – t |)
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.
50
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,y
2, where ix,y is input intensity at location (x,y) and jx,y is
output intensity; henceforth represented as s = T(r)
51
Contrast stretching and thresholding
52
Contrast stretching vs. thresholding
53
Highlighting a range of intensities
55
Negative of an image
S=L- r − 1
EX: Obtain the digital negative of the following 8- bit sub image.
UQP: (May 17) 10 Marks
58
Some basic intensity
transformations
59
Log transformation in log domain
• s = c log (1+r)
60
Power-law (gamma transformation)
• s = c rγ
62
Gamma 1, .6, .4, .3
63
Gamma 1, 3, 4, 5
Bit-plane slicing
25/08/2025 IPMV Class Lecture 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
25/08/2025 IPMV Class Lecture 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.
25/08/2025 IPMV Class Lecture 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
25/08/2025 IPMV Class Lecture 69
TIY
• Can Histogram be the signature of an image?
• 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

Module 1 : Introduction to image Processing

  • 1.
    Module 1: DIGITALIMAGE FUNDAMENTALS AND POINT PROCESSING
  • 2.
  • 3.
    Type of Images Binaryimages • Binary images take only two values either 0 or 1
  • 4.
    Gray scale images Typeof Images • contains only brightness information
  • 5.
    Colored images Type ofImages • three values per pixel and they measure intensity and chrominance of light
  • 6.
  • 7.
  • 8.
  • 9.
    Examples of X-rayimages Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall Type of Images
  • 10.
    Examples of UVimages of healthy and diseased corn Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall Type of Images
  • 11.
    Examples of microscopyimages Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall Type of Images
  • 12.
    Thematic bands ofLANDSAT satellite Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
  • 13.
    Same area picturedwith different bands Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall Type of Images
  • 15.
  • 16.
    Images that needprocessing
  • 17.
    Identify the typeof image • A) Binary Image • B) Natural Image • C) Cartoon Image • D) Computer-Generated Image
  • 18.
    Which of thefollowing images is not a natural image?
  • 20.
    20 Structure of thehuman eye Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
  • 22.
  • 23.
    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?
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
    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
  • 29.
  • 30.
    31 Sampling and quantization Source:Digital Image Processing, Gonzalez and Woods, Prentice Hall
  • 31.
    32 Sampling and quantization Source:Digital Image Processing, Gonzalez and Woods, Prentice Hall
  • 32.
    33 Surfaces and contoursof intensity Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
  • 33.
  • 34.
    35 When pixel intensitiesare outside the range represented Source: Digital Image Processing, Gonzalez and Woods, Prentice Hall
  • 35.
  • 36.
    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)
  • 44.
  • 45.
    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)
  • 50.
  • 51.
  • 52.
  • 54.
    55 Negative of animage S=L- r − 1
  • 55.
    EX: Obtain thedigital negative of the following 8- bit sub image.
  • 56.
    UQP: (May 17)10 Marks
  • 57.
  • 58.
    59 Log transformation inlog domain • s = c log (1+r)
  • 59.
  • 61.
  • 62.
  • 63.
  • 65.
    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
  • 68.
    25/08/2025 IPMV ClassLecture 69 TIY • Can Histogram be the signature of an image?
  • 69.
    • 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
  • 70.