Unit 2 Computer Vision 2025
Unit 2 Computer Vision 2025
Computer Vision
Course Code: CET 4011B Credits: 3 TH+1 Lab=4
Syllabus
Unit 1: Image Processing Fundamentals
Introduction : Types of Computer Images, Satellite Images, Medical Images, Image File Formats,
Components of Image Processing System, Fundamentals Steps in Image Processing, Dimensions of
image, Image Operations.
Image Formation and Low-Level Processing: Human Vision System, Computer Vision System,
Stereo Vision, Geometric Cameras and projection models, noise models, Human color perception.
10
Point Processing
11
Point Processing
● The new pixel value is calculated without considering the values of surrounding
pixels
13
Examples of Point Processing
● Contrast stretching: A basic gray level transformation that improves contrast
● Thresholding: A point processing technique
● Logarithmic transformations: A point processing technique that modifies pixel
intensity
● Power-law transformations: A point processing technique that modifies pixel
intensity
● Piecewise linear transformations: A point processing technique that modifies
pixel intensity
● Intensity level slicing: A basic gray level transformation
● Bit plane slicing: A basic gray level transformation
14
Point Processing
17
18
Image Negatives
import cv2
import numpy as np
cv2.imshow('original', image)
cv2.imshow('negative', negative)
cv2.waitKey(0)
cv2.destroyAllWindows() 19
Contrast Stretching expands the range of intensity levels in an Image
Extreme Contrast Stretching yields Thresholding. Thresholded image
has maximum contrast with only 0 and 255 intensities
Brightness enhancement is shifting intensities to higher values
20
Basic Gray Level Transformations
Linear
Logarithmic
Power Law
21
Logarithmic Transform
22
Logarithmic transformation
1. Log transformation
2. Inverse log transformation
s = c log(r + 1)
24
Logarithmic Transformation
25
26
Power Law Transformation
27
28
29
30
31
32
33
Contrast Stretching
It expands the range of intensity values in an image.
Contrast is difference between intensity levels of darker and brighter
pixels.
It is done in 3 ways
1. Multiplying each input pixel intensity value by a constant scalar.
2. Using Histogram equivalent.
3. applying a transform which make dark pixel darker by assigning
slope of < 1 and bright portion brighter by assigning slope > 1.
34
35
Piecewise transformation
Piecewise transformation is a
spatial domain method used for
enhancing the group of pixels
falling in the defined range. The
pixels are grouped into different
groups based on specified range
and each group has its own linear
transformation and slope. The
commonly used piecewise
transformations are,
thresholding, contrast stretching,
gray-level slicing and bit-plane
slicing
36
37
38
39
Contrast Stretching
40
Contrast Stretching
41
Contrast Stretching
42
Contrast Stretching
https://www.iosrjournals.org/iosr-jece/papers/vol1-issue2/L012
# Initialize range 2023.pdf
r1 = 55
https://ninjakx.github.io/Image_Enhancement/
s1 = 40
r2 = 140
43
s2 = 200
Intensity Level Slicing
44
Grey Level Slicing(Intensity Level)
45
Grey Level Slicing(Intensity Level)
46
Grey Level Slicing(Intensity Level)
47
Bit Plane Slicing
48
Example
49
50
Thresholding
51
Single Threshold
52
Types of Thresholding
53
Two Objects
54
Procedure for obtaining Global Thresholding value T
55
Histogram Transformation
56
Histogram Equalization
57
Histogram Equalization
58
Histogram Equalization
59
Histogram Equalization
60
Histogram Equalization
61
62
63
Questions based on Slide No. 1 to Slide No. 38
1. How point processing works for image enhancement? Explain image negative
method in brief.
2. What do you mean by image enhancement? Define point processing.
3. Illustrate the image negative transformation with suitable example.
4. Explain the mechanism of spatial domain filtering with suitable functions.
5. List down basics of intensity transformation(Grey Level) in image enhancement.
6. Why Log transform is used in image enhancement?
7. With necessary graphs, explain Log transformation and power law
transformation for spatial domain image enhancement.
8. Illustrate contrast stretching and draw the necessary graph and calculate the slop
for given range.
9. Explain the concept of histogram for various images with relevant diagrams.
10.Explain the histogram equalization operation in image enhancement with
necessary expressions.
64
Filtering with Morphology Operators
65
Filtering with Morphology Operators
66
Filtering with Morphology Operators
67
Erosion and Dilation
68
Filtering with Morphology Operators:Dilation
69
70
Dilation
71
Filtering with Morphology Operators:Erosion
72
Filtering with Morphology Operators:Erosion
73
Erosion
74
75
76
Open and Close Operation
77
Open and Close
78
79
Spatial Filtering Concepts
80
Spatial Filtering Concepts
81
Smoothing Filters
82
83
84
85
Smoothing Filters
86
Smoothing Filters
87
Smoothing Filters
88
Spatial Filtering Concepts
89
90
Smoothing Filters
91
Smoothing Filters
92
Smoothing Filters
93
Smoothing Filters
94
Smoothing Filters
95
96
Smoothing Filters
97
Smoothing Filters
98
Smoothing Filters
99
Smoothing Filters
100
Smoothing Filters
101
102
Handling pixels close to boundaries
103
104
105
106
107
108
109
Median Filter
110
Sharpening Filter
111
Sharpening Filter
112
Sharpening Filter
113
Sharpening Filter
114
115
116
Sharpening Filter
117
Sharpening Filter
118
Sharpening Filter
119
Sharpening Filter
120
121
Laplacian Filter
122
Laplacian Filter
123
Sharpening Filter
124
Sharpening Filter
125
Questions
126
Types of Image Segmentation
Image segmentation can be categorized into several types, including:
○ Thresholding Segmentation: This technique involves setting a threshold value to
separate pixels based on their intensity or color.
○ Edge-based Segmentation: It identifies object boundaries by detecting edges or
gradients within the image.
○ Region-based Segmentation: This approach groups pixels based on their visual
features, color, or texture similarity.
○ Semantic segmentation: Semantic segmentation is the process of assigning a class
label to each pixel in the image so that pixels with the same label belong to the same
object or category.
○ Clustering-based Segmentation: It utilizes clustering algorithms to group pixels with
similar attributes.
○ Instance segmentation is the process of assigning a class label and an instance label
to each pixel in the image, such that pixels with the same class label and instance label
belong to the same object or instance.
127
What Is Image Segmentation Used For?
128
Image Segmentation
129
Image Segmentation
130
Image Segmentation
131
Image Segmentation using Threshold Method
132
Image Segmentation using Threshold Method
133
134
135
136
137
138
Procedure for obtaining Global Thresholding value T
139
Refer Link: https://www.youtube.com/watch?v=eyTFqyM03L
k&t=447s
140
141
142
143
144
145
146
147
148
149
150
151
Image Segmentation
152
Introduction to Image Segmentation
153
Introduction to Image Segmentation
154
Region Approach
155
Region Approach
156
Region Approach
157
158
Introduction to Image Segmentation
159
160
161
https://www.youtube.com/watch?v=0kUGpgIrZIw
162
163
164
https://www.youtube.com/watch?v=0kUGpgIrZIw
165
Edge Based Segmentation
166
Edge Based Segmentation
167
168
Edge Based Segmentation
169
Edge Based Segmentation
170
Edge Based Segmentation
171
Edge Based Segmentation
172
Edge Based Segmentation
173
Hough Transform
174
Hough Transform
175
Hough Transform
176
Hough Transform
177
Hough Transform
178
Hough Transform
179
Hough Transform
180
Hough Transform
181
Hough Transform
182
Links: Hough Transform
https://universe.bits-pilani.ac.in/uploads/JNKDUBAI/hough_transform.
pdf
https://www.youtube.com/watch?v=XRBc_xkZREg
183
Clustering Technique
184
Clustering Technique
185
186
187
188
189
190
191
Clustering Technique
192
Clustering Technique
193
Important Links
https://www.youtube.com/watch?v=j3_Ck5oP5oI
https://www.youtube.com/watch?v=fiDDn_F9U74
https://www.youtube.com/watch?v=FQy3bTe2pVc
https://www.youtube.com/watch?v=j3_Ck5oP5oI
https://www.youtube.com/watch?v=fiDDn_F9U74
https://www.youtube.com/watch?v=FQy3bTe2pVc