Mod 5
Mod 5
2nd Edition
S.
Sridhar
Dr. Poornima B V
Assistant Professor
Dept. of CSE
© Oxford University Press 2016. All rights
reserved.
WHAT YOU LEARN IN THE COURSE
MODULE-V
Image Segmentation: Introduction, classification, detection of
discontinuities, Edge detection (up to canny edge
detection(included)).
Image Morphology: Need of Morphological Processing,
Morphological operators, Hit or miss transform.
20 20 10 10 10
20 20 10 10 10
20 20 10 10 10
20 20 10 10 10
15 15 10 10 10
15 15 10 10 10
20 20 10 10 10
R1
20 20 10 10 10
R3
20 20 10 10 10
20 20 10 10 10
15 15 10 10 10
R2 15 15 10 10 10
R
Formal Definition of Image Segmentation
An isolated point is a point whose grey level is significantly different from its background
max(gx,gy)
Edge Detection
•
• A generic gradient based algorithm can be given as:
1. Read the image, smooth it
2. Convolve the image f with gx
3. Convolve the image f with gy
4. Compute edge magnitude and edge orientation
5. Compare edge magnitude with a threshold value. If the edge
magnitude is higher than the threshold, it is a possible edge point
Types of Edge Detectors
LoG = +
•
Feature / Aspect LoG (Laplacian of Gaussian) DoG (Difference of Gaussians)
Full Name Laplacian of Gaussian Difference of Gaussians
Approximation of LoG using
Type Second-order derivative operator
Gaussian filters
1. Smooth with Gaussian → 2. Apply 1. Blur image with two Gaussians
Process
Laplacian (σ₁, σ₂) → 2. Subtract
Detect edges using zero-crossings of Approximate LoG to detect edges
Purpose
second derivative efficiently
Zero-crossings in the difference of
Edge Detection Method Zero-crossings in the Laplacian
blurred images
Noise Sensitivity Low (due to initial Gaussian smoothing) Also low, depending on σ values
Higher (requires calculating second Lower (just Gaussian blurs and
Computational Cost
derivatives) subtraction)
Accuracy More accurate but slower Slightly less accurate but faster
Two Gaussian kernels with
Kernel Single custom LoG kernel
different σ values
Classical edge detectors, theory-based
Used In Efficient implementations like SIFT
methods
Feature detection, blob detection
Application Example Edge detection with precise localization
(e.g., scale-space in SIFT)
Canny edge detection
The Canny approach is based on optimizing trade-off between two performance criteria
and can be described as follows:
Image Morphology
(A Ս B) Ս C = A Ս (B Ս C)
(A Ո B) Ո C = A Ո (B Ո C)
(A Ս B) Ո (A Ս C)
•
Structuring Elements
• Structuring elements are small images that are used to probe the
original image.
• For basic morphological operators, the structuring elements have
ones, zeros and don’t cares. These elements select or supress the
features of a certain shape. Thus a morphological operator is defined
by its structuring element and the applied set operator.
Structuring Elements
Some standard structuring elements are:
• Line segment
• It is characterized by the length and orientation
• Disk
• Can be described for digital grids
• Set of points
• Composite structuring elements
• Two structuring elements that share a common origin
• Elementary structured mask
• These are square grids. Smallest size is 2x2, but typically, it is 3x3.
• It has the origin in the center of the matrix.
• It is then shifted over the image, and at each pixel of the image, its elements
are compared with the set of underlying pixels.
• Fit: When all the pixels in the structuring element cover the
pixels of the object, we call it Fit.
1 1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1
MORPHOLOGICAL OPERATORS
• The basic morphological operators are
dilation and erosion.
Purpose:
• Fills small gaps in the foreground.
• Connects nearby objects.
• Smoothens contours from the outside.
Properties of Opening/Closing
Hit or miss Transform
• The hit-or-miss transform is a morphological operation
used to detect specific patterns in binary images by
comparing the image with two structuring elements.
• It works by checking if one structuring element (a "hit"
element) perfectly matches the foreground pixels and
another structuring element (a "miss" element) perfectly
matches the background pixels in a specific region of the
image.
• If both conditions are met, the pixel at the center of the
structuring elements is set to foreground, indicating a
match.
Hit or miss Transform