SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving...
Transcript of SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving...
![Page 1: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/1.jpg)
Image Processing
Segmentation
![Page 2: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/2.jpg)
Fundamental steps in problem solving
using digital image analysis
2
Problem
Image
Acquisition
Preprocessing
Segmentation
Representation and Description
Classification, Recognition,
interpretation
Solution
![Page 3: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/3.jpg)
Image Segmentation
There are many definitions:
Segmentation subdivides an image into its constituent
regions and/or objects ( Gonzales, pp567)
Segmentation is a process of grouping together pixels
that have similar attributes ( Efford , pp250)
Image Segmentation is the process of partitioning an
image into non-intersecting regions such that each
region is homogeneous and the union of no two adjacent
regions is homogeneous ( Pal, pp1277)
3
![Page 4: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/4.jpg)
4
What is Image Segmentation?
To be able to extract information from an image it is
common to subdivide it into background and objects. This
is called segmentation
Segmentation:
Split or separate an image into regions
To facilitate recognition, understanding, and region of interests
(ROI) processing
![Page 5: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/5.jpg)
5
What is Image Segmentation?
Full segmentation: Individual objects are separated from the
background and given individual ID numbers (labels).
Partial segmentation: The amount of data is reduced (usually by
separating objects from the background) to speed up further
processing.
Segmentation ...
... is often the most difficult problem to solve in image analysis;
there is no universal solution!
The problem can be made much easier if solved in cooperation with
the constructor of the imaging system (choice of sensors,
illumination, background, etc.)
Divide the image contents into its constituent regions or objects
![Page 6: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/6.jpg)
6
Region definition
Define P as a function operating on a region. For a pixel x, P(x) =
true if x satisfies a specific property
After applying the function, the image becomes a binary image.
Using pixel connectivity definitions, a region can be defined
Divide the image contents into its constituent regions
![Page 7: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/7.jpg)
7
Object definition
An object is a set of pixels that have similar
relations
A certain intensity
Situated in an area delimited by a
discontinuity of intensity
An intensity that has a statistical relation to
it’s surrounding
![Page 8: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/8.jpg)
Basic Principle - Segmentation
Segmentation algorithms are often based on
one of the following two basic properties of
intensity values:
Similarity
Partitioning an image into regions that are similar
according to a set of predefines criteria.
Discontinuity
Detecting boundaries of regions based on local
discontinuity in intensity.
8
![Page 9: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/9.jpg)
Similarity vs Discontinuity (1)
9
![Page 10: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/10.jpg)
Similarity vs Discontinuity (2)
10
Features
• intensity
• texture
• edge sharpness
• any other relevant
feature(s)
![Page 11: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/11.jpg)
Human visual system –an excellent segmentation system
11
![Page 12: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/12.jpg)
12
We are very insensitive
to all types of distortion !
We can even “see”
what is not there !
![Page 13: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/13.jpg)
13
Image Segmentation Methods
Edge based segmentation [Discontinuity]
Finding boundary between adjacent regions
i.e. Detecting edges that separate regions from each other.
Threshold based segmentation [Similarity]
Finding regions by grouping pixels with similar intensities
i.e. Based on pixel intensities (shape of histogram is often used for
automation).
Region based segmentation [Similarity]
Finding regions directly using growing or splitting
i.e. Grouping similar pixels (with e.g. region growing or merge & split).
Motion (Match) based segmentation [Similarity]
Finding regions by comparing successive frames of a video
sequence to identify regions that correspond to moving objects
i.e. Comparison to a given template.
![Page 14: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/14.jpg)
Segmentation Using Discontinuity
Point, Line & Edge Detection
using Image Intensity Derivatives
14
![Page 15: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/15.jpg)
15
Discontinuities
Point
An area with high frequency information in
both x and y directions
Line
An area with high frequency information in
one direction and low frequency in the other.
Intensity is the same on both sides of the line
Edge
Separates two areas with different intensities
![Page 16: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/16.jpg)
Point, line & edge detection
16
• Basic discontinuities in
images
• Detection from the 1st and
2nd order derivatives of the
intensity profile
• Sensitive to image noise
-> noise filtering needed
![Page 17: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/17.jpg)
Background
Derivatives of intensity profile f(x)
First-order derivative
Second –order derivative
17
spatial filter with [-1 1] kernel
filter with kernel [1 2 1]
Derivatives can be approximated by simple spatial filters !
![Page 18: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/18.jpg)
Characteristics of First and
Second Order Derivatives
1st order derivatives generally produce thicker edges in image
2nd-order derivatives have a stronger response to fine detail, such as
thin lines, isolated points, and noise
Second-order derivatives produce a double-edge response at ramp and
step transition in intensity
The sign of the second derivative can be used to determine whether a
transition into an edge is from light to dark or dark to light
18
![Page 19: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/19.jpg)
Detection of Isolated Points
The Laplacian
Filter with 3x3 kernel (mask)
Filtering using 3x3 mask
19
where zi is the pixel intensity at the location
of weight wi
![Page 20: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/20.jpg)
Detection of Isolated Points
20
![Page 21: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/21.jpg)
Point detection in MATLAB
g = abs(imfilter(double(f), w)) >= T;
where
f the input image
g the output image
w the filter kernel
T a given (known) threshold
What if the threshold T is unknown?w = [-1 -1 -1; -1 8 -1; -1 -1 -1];
g = abs(imfilter(double(f), w));
T = max(g(:));
g = g >= T;
i.e. T is derived from the image data itself!
21
![Page 22: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/22.jpg)
Line detection with the Laplacian
22
![Page 23: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/23.jpg)
Line Detection …
Detection of lines at specific angles
Tune the mask to the desired angle
23
This mask is isotropic, i.e. its response is independent of
direction
![Page 24: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/24.jpg)
24
![Page 25: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/25.jpg)
25
What is an edge?
Edges are places in an image that
corresponds to object boundaries
Edges are pixels where image
brightness changes abruptly
An edge is a property attached to an individual pixel and is calculated from the image function behavior in a neighborhood of the pixel
It is a vector variable (magnitude of the gradient, direction of an edge)
Brightness vs. Spatial Coordinates
![Page 26: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/26.jpg)
26
Physical Edges
Different objects in physical contact
Spatial change in material properties
Abrupt change in surface orientation
Image Edges
In general: Boundary between contrasting regions
in image
Specifically: Abrupt local change in brightness
Type of edges
![Page 27: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/27.jpg)
27
Edge Model
![Page 28: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/28.jpg)
Edges in reality
28
![Page 29: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/29.jpg)
Edge Detection in 1-D
Edges can be characterized as either:
local extrema of f’(x)
zero-crossings of f’’(x)
29
)(xf
)(xf
)(xf
)(xf
)(xf
)(xf
)(xf
)(xf
)(xf
)(xf
)(xf
)(xf
![Page 30: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/30.jpg)
Edges and derivatives
30
The magnitude of the first
derivative can be used for
edge detection
The zero crossing indicates
the middle of the edge
![Page 31: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/31.jpg)
31
Noise
Noise is always a factor in images
Derivative operators are high-pass filters
High-pass filters boost noise
Noise create false edges
Key concept:
Build filters to respond to edges and suppress
noise
![Page 32: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/32.jpg)
Edges and Derivatives
However …
The first derivative is rather sensitive
and the second derivative is very
sensitive to noise!
Therefore … Image smoothing for noise reduction
Detection of individual edge points
Edge localization, i.e. combination of
individual points into edge(s)
These are fundamental steps in edge
detection
32
![Page 33: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/33.jpg)
33
Edge Detection
Edge information in an image is found by
looking at the relationship a pixel has with its
neighborhoods
If a pixel’s gray-level value is similar to those
around it, there is probably not an edge at that
point
If a pixel’s has neighbors with widely varying
gray levels, it may present an edge point
![Page 34: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/34.jpg)
34
Edge Detection Methods
Many are implemented with convolution masks and based on discrete approximations to differential operators
Differential operations measure the rate of change in the image brightness function
Some operators return orientation information. Other only return information about the existence of an edge at each point
![Page 35: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/35.jpg)
Edge Detection
Finding the edge strength and direction
35
Basic Edge Detection by Using
First-Order Derivative
The direction of the edge
![Page 36: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/36.jpg)
Edge Detection
Finding the edge strength and direction
36
Approximations of the magnitude
Determination of the partial derivatives
![Page 37: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/37.jpg)
37
Directional Edge Detection
Tx
yxf
),(
Ty
yxf
),(
Horizontal operator
(finds vertical edges)
Vertical operator
(finds horizontal edges)
Ty
yxf
x
yxf
sin
),(cos
),(
finds edges perpendicular to the direction
![Page 38: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/38.jpg)
38
Designing an edge detector
Criteria for an “optimal” edge detector:
Good detection: the optimal detector must minimize the probability of
false positives (detecting spurious edges caused by noise), as well as
that of false negatives (missing real edges)
Good localization: the edges detected must be as close as possible to
the true edges
Single response: the detector must return one point only for each true
edge point; that is, minimize the number of local maxima around the true
edge
![Page 39: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/39.jpg)
39
![Page 40: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/40.jpg)
40
![Page 41: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/41.jpg)
Sobel
41
![Page 42: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/42.jpg)
The effect of filtering
42
![Page 43: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/43.jpg)
43
Laplacian of Gaussion (LoG)
Approximation of
differential operator
Tunable to the “scale”
of the edge
Based on 2D
Gaussian function
Sometimes called
“Mexican hat
operator”
![Page 44: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/44.jpg)
Edge detection with the LoG
Convolve image f with LoG filter
Find zero crossings in the result g
Equal to (Marr-Hildreth):
44
1. Filter (convolve) f with Gaussian low-pass filter G
2. Compute the Laplacian of the resulting image
3. Find zero crossings in the image resulting from step 2
![Page 45: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/45.jpg)
Edge detection with the LoG
45
![Page 46: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/46.jpg)
The Canny Edge Detector
Optimal for step edges corrupted by white noise.
The Objective
Low error rate
The edges detected must be as close as possible to the true edge
Edge points should be well localized
The edges located must be as close as possible to the true edges
Single edge point response
The number of local maxima around the true edge
should be minimum
46
![Page 47: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/47.jpg)
The Canny Edge Detector:
Algorithm
Let f(x ,y ) denote the input image and G(x ,y ) denote the
Gaussian function:
We form a smoothed image, fs(x,y) by Convolving G and f.𝑓𝑠 𝑥, 𝑦 = 𝐺 𝑥, 𝑦 ∗ 𝑓(𝑥, 𝑦)
Compute the gradient magnitude and direction (angle):
The gradient M(x,y) typically contains wide ridge around
local maxima. Next step is to thin those ridges.
47
![Page 48: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/48.jpg)
The Canny Edge Detector:
Algorithm
Nonmaxima suppression:
Let d1,d2,d3, and d4 denote the four basic edge
directions for a 3 x3 region:
horizontal, -45 degree,
vertical,+45 degree respectively.
1. Find the direction dk that is closest to α(x,y).
2. If the value of M(x,y) is less than at least one of
its two neighbors along dk, let gN(x,y)=0
(suppression); otherwise, let gN(x,y)=M(x,y)
48
![Page 49: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/49.jpg)
The Canny Edge Detector: Algorithm
49
![Page 50: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/50.jpg)
The Canny Edge Detector:
Algorithm
The final operation is to threshold gN(x,y)= to
reduce false edge points.
Hysteresis thresholding:
And
50
![Page 51: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/51.jpg)
The Canny Edge Detector:
Algorithm
Depending on the value of TH, the edges in gNH(x,y)
typically have gaps. Longer edges are formed using
the following procedure:
(a). Locate the next unvisited edge pixel, p, in gNH(x,y).
(b). Mark as valid edge pixel all the weak pixels in gNH(x,y) that are
connected p to using 8-connectivity.
(c). If all nonzero pixel in gNH(x,y) have been visited go to step (d),
esle return to (a).
(d). Set to zero all pixels in gNH(x,y) that were not marked as valid
edge pixels.51
![Page 52: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/52.jpg)
The Canny Edge Detection:
Summary
Smooth the input image with a Gaussian filter
Compute the gradient magnitude and angle
images
Apply nonmaxima suppression to the
gradient magnitude image
Use double thresholding and connectivity
analysis to detect and link edges
52
![Page 53: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/53.jpg)
Edge detection with the LoG
and Canny algorithm
53
![Page 54: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/54.jpg)
Edge detection with the LoG
and Canny algorithm
54
![Page 55: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/55.jpg)
Edge detection in MatLab
>>[g,t] = edge(f, ‘method’, params);
where
f the input image
method the edge detection method; params a
set of parameters; t the threshold used by edge
(optional)
Edge detection in MatLab – Sobel
>> [g,t] = edge(f, ‘sobel’, T,
dir);
where
‘sobel’ the Sobel edge detection
method; T a specified threshold; dir
preferred edge detection (‘horizontal’,
‘vertical’, ‘both’) 55
![Page 56: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/56.jpg)
56
Segmentation Using Discontinuity
Line Detection with the Hough Transform
![Page 57: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/57.jpg)
The Hough Transform
Application
Detecting lines in an image (irrespective of their angles)
Basics
Point (xi,yi) in the (x,y) image plane
Lines through (xi,yi): yi = axi + b
Two points (xi,yi) and (xj,yj) on the same line:
yi = axi + b and yj = axj + b -> same coefficients (a,b)
57
![Page 58: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/58.jpg)
The Hough Transform
The Hough Transform from (x,y) to (a,b)
58
![Page 59: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/59.jpg)
The Hough Transform
Detecting lines with the Hough Transform
Convert the image to a binary image B(e.g.
thresholded edge image to enhance lines)
Transform all points (xi,yi) to their
corresponding lines in the Hough space
Detect crossings of lines
Transform the coordinates (ai,bi) of these
crossings to lines in the (xi,yi) image domain
59
![Page 60: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/60.jpg)
The Hough Transform
What about vertical lines?
60
![Page 61: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/61.jpg)
The Hough Transform
The Hough Transform – Another parametrization
61
![Page 62: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/62.jpg)
The Hough Transform
62
![Page 63: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/63.jpg)
The Hough Transform-
Example
63
![Page 64: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/64.jpg)
The Hough Transform
64
![Page 65: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/65.jpg)
65
Segmentation Using Similarity
Image Intensity Thresholding
![Page 66: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/66.jpg)
66
The derivative method will fail if the hills in
the histogram are situated to closely
The possible reasons:
The image is very noisy
The difference in intensity between object and
background is low
Thresholding
![Page 67: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/67.jpg)
Global Thresholding
Global thresholding in MATLAB
>> out = in > T;
where
in the input image;T a specified threshold;out the binary output image
67
![Page 68: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/68.jpg)
68
The area of the segmented object is less
sensitive to errors in threshold level if we
chose T to the value where the histogram
has a local minimum
The local min values can be found by
setting the derivative of the histogram
equal to zero
Thresholding
![Page 69: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/69.jpg)
Global Thresholding
Performance and Multiple?
Works well for
– bi-modal histograms
– images with low noise level
– images without intensity
inhomogeneity (transients)
May need morphological post-
processing
– to remove small objects
– to close holes
Multiple (global) thresholding
Can be used to select pixels within a certain
intensity range
69
![Page 70: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/70.jpg)
Global Thresholding
The influence of noise
70
![Page 71: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/71.jpg)
Global Thresholding
The influence of intensity transients
71
![Page 72: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/72.jpg)
72
Images having uneven illumination makes it
difficult to segment using histogram
This approach is to divide the original image
into sub images and use the thresholding
process to each subimage
Adaptive Thresholding
![Page 73: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/73.jpg)
Adaptive Global Thresholding
1. Select initial global threshold T (e.g. mean of all pixels)
2. Segment image into two groups– All values > T : group G1 with mean m1
– All values ≤ T : group G2 with mean m2
3. Compute new threshold T = ½ (m1 + m2)
4. Repeat steps 2 and 3 until T changes less than predefined T (or % of T )
73
![Page 74: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/74.jpg)
Adaptive Global Thresholding
Method 1 in MatLab>> T = 0.5*(double(min(f(:)))+double(max(f(:))));
>> done = false;
>> while ~done
g = f >= T;
Tnext = 0.5*(mean(f(g)) + mean(f(~g)));
done = abs(T - Tnext) < 0.5;
T = Tnext;
end
T the resulting threshold
74
![Page 75: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/75.jpg)
Adaptive Global Thresholding,
Otsu
75
![Page 76: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/76.jpg)
Adaptive Global Thresholding,
Otsu
76
![Page 77: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/77.jpg)
Adaptive Global Thresholding,
Otsu
77
Maximize
![Page 78: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/78.jpg)
Adaptive Global Thresholding,
Otsu
78
![Page 79: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/79.jpg)
Adaptive Global Thresholding,
Otsu
Smothing may be required
79
![Page 80: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/80.jpg)
,,,but doesn’t help !!!
80
![Page 81: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/81.jpg)
Adaptive Global Thresholding,
Otsu
Multiple global thresholds
81
![Page 82: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/82.jpg)
82
![Page 83: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/83.jpg)
Local Thresholding
Local thresholding (by image partitioning)
83
![Page 84: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/84.jpg)
Region Growing, Region Splitting &
Merging
84
Segmentation Using Similarity
![Page 85: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/85.jpg)
Region Growing
85
![Page 86: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/86.jpg)
Region Growing
86
![Page 87: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/87.jpg)
Region Growing
87
![Page 88: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/88.jpg)
Region Splitting & Merging
88
![Page 89: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/89.jpg)
Region Splitting & Merging
89
![Page 90: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/90.jpg)
Region Splitting & Merging
90
![Page 91: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/91.jpg)
91
Segmentation Using Similarity
WatersheddingA kind of region growing
![Page 92: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/92.jpg)
Watershedding
Think of the gray level image as a Landscape.
Let water rise from the bottom of each valley
(the water from the valley it given its own label).
As soon as the water from two valleys meet,
build a dam, or a watershed.
These watersheds will define the borders
between different regions in the image.
The watershed algorithm can be used directly on
the image, on an edge enhanced image or on a
distance transformed image.92
![Page 93: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/93.jpg)
Watershedding
Example of watershed applied to gray image
93
![Page 94: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/94.jpg)
Watershedding
94
![Page 95: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/95.jpg)
95
Watershed segmentation
A watershed is a ridge dividing areas drained by different
rivers
Pixel intensities are considered as heights
A watershed line divides areas into parts which would collect
water that falls on the area
http://cmm.ensmp.fr/~beucher/wtshed.html
![Page 96: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/96.jpg)
Watershedding
96
http://www.engineering.uiowa.edu/~dip/LECTURE/Segmentation3.html#watershed
![Page 97: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/97.jpg)
Watershedding
97
![Page 98: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/98.jpg)
98
Watershed segmentation
Distance transform
Calculate the geometrical distance to a height
Gradients
Strong gradients can be watershed lines
Markers
Internal & External
All gradients can create too many regions
Only use some gradients
![Page 99: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/99.jpg)
Watershedding
99
![Page 100: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/100.jpg)
100
![Page 101: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/101.jpg)
Match based segmentation
101
![Page 102: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/102.jpg)
http://se.mathworks.com/matlabcentral/fileexchange/22543-detects-multiple-disks--coins--in-an-
image-using-hough-transform
http://se.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial---
blobsdemo--
102
![Page 103: SVD and digital image processingImage Processing Segmentation Fundamental steps in problem solving using digital image analysis 2 Problem Image Acquisition Preprocessing Segmentation](https://reader033.fdocuments.in/reader033/viewer/2022050113/5f4ab590e8b98305345738ce/html5/thumbnails/103.jpg)
103* Pictures from Mean Shift: A Robust Approach toward Feature Space Analysis, by D. Comaniciu and P. Meer http://www.caip.rutgers.edu/~comanici/MSPAMI/msPamiResults.html
*