0% found this document useful (0 votes)
37 views

Lecture 5 of Computer Vision

Uploaded by

mohamed fikry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Lecture 5 of Computer Vision

Uploaded by

mohamed fikry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Computer Vision

Dr. Sameh Zarif

Lecture #5
General Rules
Computer Vision Systems Functions

Image acquisition

Pre-processing

Detection/segmentation

Feature extraction

High-level processing

Decision making
IMAGE SEGMENTATION
Picking the threshold is the hard part

❖ Human operator decided the threshold

❖ Use mean gray level of the image

❖ Analyzing the histogram of an image


Choosing an Appropriate Threshold
Value
❖ Clearly the success of segmentation operation
depends very much on choosing an appropriate
threshold level.
❖ If we choose a value too low, we may decrease
the size of some of the objects, or reduce their
number
❖ If we choose a value too high, we may begin to
include extraneous background material.
Choosing an Appropriate Threshold
Value
The ISODATA Method
Basic Global Thresholding
Basic Global Thresholding

❖ For example, for threshold T1 and T2, any point which


satisfies the relation T1<f(x,y) <T2 would be labeled as
an object point and all others would be labeled
background points.
❖ In general this technique is less reliable than a single
variable threshold.
❖ This is because it often difficult to establish multiple
thresholds to effectively isolate the region of interest
especially when the number of modes in the
corresponding histogram is high.
Example for Double Threshold
Global Thresholding

❖ Due to the severe illumination gradient across the scene, the


peaks corresponding to foreground and background have
run together. So simple thresholding does not give good
results.

T=80 T=120
Adaptive thresholding - how it works?

There are two main approaches to finding the threshold:


(i) Chow and Kaneko approach
(ii) local thresholding.

❖ The assumption behind both methods is that smaller


image regions are more likely to have approximately
uniform illumination, thus being more suitable for
thresholding.
Adaptive thresholding - Chow and
Kaneko
❖ Chow and Kaneko divide an image into an array of
overlapping sub-images and then find the optimum
threshold for each sub-image by investigating its
histogram.

❖ The threshold for each single pixel is found by


interpolating the results of the sub-images.

❖ The drawback of this method is that it is computational


expensive and, therefore, is not appropriate for real-time
applications.
Chow and Kaneko Example
Adaptive thresholding - Local
thresholding
❖ The local threshold is to statistically examine the
intensity values of the local neighborhood of each pixel.
❖ The statistic which is most appropriate depends largely
on the input image.
❖ Simple and fast functions include the mean of the local
intensity distribution,

the median value,

or the mean of the minimum and maximum values,


Adaptive thresholding - Local
thresholding
❖ The size of the neighborhood has to be large enough to
cover sufficient foreground and background pixels,
otherwise a poor threshold is chosen.
❖ On the other hand, choosing regions which are too large
can violate the assumption of approximately uniform
illumination.
❖ This method is less computationally intensive than the
Chow and Kaneko approach and produces good results
for some applications.
Contextual Techniques

❖ Pixels belonging to the same object are close to each


other. we look at proximity as well as gray level
Edge based approaches
❖ e.g. use edge detection to identify the boundary of a region
❖ can be difficult to generate a complete boundary (no holes)
Region based approaches
❖ group pixels together based on similarity and proximity.
❖ specify similarity criteria.
Region based approaches
🞂 Fast scanning Algorithm: Cheng-Jin Kuo`s method
Region based approaches
Region based approaches

Last step: merge small region to big region


Region based approaches
Clustering Based Segmentation
Image Segmentation by K-Means
Example

You might also like