0% found this document useful (0 votes)
15 views29 pages

Updated DIP UNIT4-2024

Digital Image Processing Unit 4

Uploaded by

prasannr3
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)
15 views29 pages

Updated DIP UNIT4-2024

Digital Image Processing Unit 4

Uploaded by

prasannr3
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/ 29

EC8093- DIP UNIT IV – IMAGE SEGMENTATION

UNIT IV – IMAGE SEGMENTATION PART A-TWO MARKS

1. What is meant by image segmentation?

Image segmentation is a method in which a digital image is broken down into various
subgroups called Image segments which helps in reducing the complexity of the image to make
further processing or analysis of the image simple

2. Write the applications of segmentation. (NOV/DEC-18)


Segmentation is the foremost step for all the detection and recognition applications. The
applications of segmentation are,
(a) Detection of cancerous cells from medical images
(b) Segmentation of roads from satellite images
(c) Vehicle Number Plate recognition
(d) Handwritten character recognition

3. How are edges detected in images?


Derivatives are used to detect the edges in images.
First order derivative filters are used to detect the presence of edge.
Example:
 Robert's Cross Gradient Operator
 Prewitt's Operator
 Sobel's Operator
Second order derivative filters are used to detect the thin edges that is the fine details in the
image. Example :Laplacian

4. Write about linking edge points.


The approach for linking edge points is to analyze the characteristics of pixels in a small
neighborhood (3 x 3 or 5 x 5) about every point (x, y) in an image that has under gone edge
detection. All points that are similar are linked, forming a boundary of pixels that share some
common properties.

5. What are the two properties used for establishing similarity of edge pixels?
(a) The strength of the response of the gradient operator used to produce the edge pixel.
(b) The direction of the gradient.

6. What is edge? What are its types?


An edge is a set of connected pixels that lie on the boundary between two regions.

1
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

Types of Edges:
(a) Ideal Edge
(b) Ramp Edge
(c) Line Edge
(d) Roof Edge

7. Give the properties of the second order derivative a round an edge.


(a) The sign of the second order derivative can be used to determine whether an edge pixel
lies on the dark or light side of an edge.
(b) It produces two values for every edge in an image.
(c) An imaginary straight line joining the extreme positive and negative values of the
second derivative would cross zero near the midpoint of the edge.

8. What is meant by zero crossing property of second order derivative ?.


An imaginary line joining the extreme positive and negative values of the second derivative
would cross zero near the midpoint of the edge. This property is called zero crossing property
and is used for locating the centre of thick edges.

9. What are the disadvantages of Laplacian operator?


(a) It is very sensitive to noise
(b) Magnitude of laplacian produces double edges, hence it complicates segmentation.
(c) Laplacian is unable to detect edge direction

10. What is LOG (Laplacian of Gaussian ) or Mexican hat function?(NOV/DEC 16)


To overcome the disadvantages of Laplacian operator it is combined with smoothing as
precursor to find edges via zero crossings. Due to its shape, LOG is sometimes called as
Mexican hat function.

11. What are the various techniques that can be used for edge linking?
The various techniques used for edge linking are
(a) Local Processing
(b) Global Processing via Hough Transform
(c) Global Processing via Graph Theoretic Techniques.

12. What is object point and background point?


For any image f (x,y), if we analyze the histogram of the image we find that object and
background pixels have gray levels grouped into two dominant modes. To segment the objects
from the background select a threshold T that separates these modes. Then any point (x, y) for
which f(x, y) > T is called an object point. Otherwise the point is called background point.
2
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

13. What is Thresholding? What are its types (OR) How an image are segmented
using thresholding?(APR/MAY-19)
Thresholding is the process of segmenting an image based on a threshold value that separates
the object and background of the image. Certain images will contain multiple objects, which
can be segmented using multiple thresholds.
Types of Thresholding
(a) Global Thresholding
(b) Variable Thresholding
(c) Regional (or) Local Thresholding
(d) Dynamic (or) adaptive thresholding

14. What are the disadvantages of thresholding?


(a) Only two classes (object, background) are generated hence cannot beapplied to multi-
channel images.
(b) More sensitive to noise.
(c) Requires the input image to have homogenous intensity.

15. Define Global thresholding and give its application?


It is simplest thresholding technique and it uses a single global threshold, T to portion an
image histogram.
Global threshold – ‘T’ depends only on gray level f(x, y).
Segmentation is implemented by first scanning all the pixels in the image one by
one. Then each pixel is labeled either object or background. This depends on whether the
gray level value is greater than or less than 7.
Application: It is used in highly controlled environments like industrial inspection
applications

16. Define adaptive thresholding?


T – Depends on f(x, y), P(x, y) as well as the coordinates x, y.
It is a solution for uneven illumination.
Imaging factors like uneven illumination changes a perfectly dividable histogram into a
histogram which cannot be segmented by a single global threshold.

17. Define local thresholding? [APR / MAY 2011]


T – Depends on both f(x, y), P(x, y).
Local thresholding is a method used to obtain the information during segmentation.
It uses the gradient and Laplacian operator
18. What are the factors affecting the accuracy of region growing?(MAY 2014)

3
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

 The selection of similarity criterion depends not only on the problem consideration but
also on the type of image data available which affects the region growing.
 Descriptors can yield misleading results if connectivity or adjacency information is not
used in region growing process.
 Formulation of stopping rule affects the region growing.

19. What are the limitations of region oriented segmentation techniques? [JUNE 2010]
 Current region dominates the growth process -- ambiguities around Edges of adjacent
regions may not be resolved correctly.
 Different choices of seeds may give different segmentation results.
 Problems can occur if the (arbitrarily chosen) seed point lies on an edge.

20. State the conditions to be met by the partitions in region based segmentation? [NOV
2011]
 Let R – be the entire region of the image.
 The predicate P(Ri) is used to check the condition. In any region, if P(Ri)= true, then
image is subdivided into various sub images.
 If P(Ri) = false, then divide the image into quadrants. If P(Ri) = false, then further divide
the quadrants into sub quadrants.

21. Define region growing.(May/June 17)


Region growing is a procedure that groups pixels or sub regions in to layer regions based on
predefined criteria. The basic approach is to start with a set of seed points and from there grow
regions by appending to each seed the neighbouring pixels that have properties similar to the
seed.

22. Specify the steps involved in splitting and merging.


(d) Split any region Ri into 4 disjoint quadrants for which P(Ri)=FALSE
(e) Merge any adjacent regions Rj and Rk for which P(Rj U Rk)=TRUE.
(f) Stop when no further merging or splitting is possible.

23. What is a quadtree?


Quadtree is a tree in which each node have exactly four descendants.

24. Explain Watershed Segmentation.


 In watershed segmentation the image is considered as a topographic surface. The gray
level of the image represents the altitudes.
 The regional minimum is called catchment basin and watershed lines are the lines
separating the catchment basins. Using the watershed lines the image is segmented into
regions.

4
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

25. What is catchment basin (or) watershed?


For a particular regional minimum, the set of points at which a drop of water if placed would
fall with a certainty to a single minimum are called as catchment basins or watersheds.

26. What is watershed line?


For a particular regional minimum, the set of points at which a drop of water if placed would
be equally likely to more than one such minimum are called watershed lines or divide lines.

27. What is meant by markers?


 An approach used to control over segmentation is based on markers. Marker is a
connected component belonging to an image.
 Markers are of two types: Internal markers and External Markers. Internal Markers are
associated with objects of interest whereas external markers are associated with back
ground.

28. What are the applications of watershed segmentation?


Watershed segmentation techniques are used for extraction of nearly uniform (blob like)
objects from the background. Watershed line form connected paths, thus giving continuous
boundaries between regions.

29. How dams are constructed in watershed segmentation?


Dams are constructed by setting all the points in the path to a value greater than the maximum
intensity value of the image. This will prevent water from crossing over the part of the
completed dam as the level of flooding is increased.

30. What are the drawbacks of Watershed segmentation?


The drawbacks of watershed segmentation
(g) Over segmentation
(h) Sensitivity of noise
(i) Poor performance in the area of low contrast boundaries
(j) Poor detection of thin structures

31. Why blur is to be removed from images? (nov 2014)


The blur is caused by lens that is in improper manner, relative motion between camera and
scene and atmospheric turbulence.It will introduce bandwidth reduction and make the image
analysis as complex.To prevent these problems only the blur is removed from images.

5
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

32. What is erosion?


Erosion shrinks or thins objects in a binary image. In fact, we can view erosion as a
morphological filtering operation in which image details smaller than the structuring element
are filtered (re-moved) from the image. Erosion performed the function of a "line filter."

33. What is dilation?


Unlike erosion, which is a shrinking or thinning operation, dilation "grows" or "thickens"
objects in a binary image.The specific manner and extent of this thickening is controlled by the
shape of the structuring element used.

34. How the derivatives are obtained in edge detection during formulation? (APR/MAY-
18)
The first derivative at any pointin an image is obtainedby using the magnitude of the gradient at
that point.similarly, the second derivatives are obtained by using the laplacian.

35. How the discontinuity is detected in an image using segmentation? (APR/MAY-18)


The steps used to detect the discontinuity in an image using segmentation are
a) Compute the sum of products of the coefficient with the gray levels contained in the
region encompassed by the mask.
b) The response of the mask at any point in the image is R – W1Z1+W2Z2+W3Z3…..
Z= gray levels of the pixels associated with mass coefficient W
c) The response of the mask is defined with respect to its centre location.

36. Give the 3 x 3 mask to detect horizontal line in an image(APR/MAY-19)


(or) . Recall the 3 × 3 mask for detection of edge points in an image. [May 2021]

The sobel technique perform 2D spatial gradiant of an image and highlights region of high
spatial frequency that correspond to edge. In general it used to find estimated absolute gradient
magnitude at each point in n input gray scale image.

Z1 Z2 Z3 -1 -2 -1 -1 0 1
Z4 Z5 Z6 0 0 0 -2 0 2
Z7 Z8 Z9 1 2 1 -1 0 1

6
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

37. Define the structuring element in morphological processing [May 2021]


An essential part of the morphological dilation and erosion operations in the structuring
element used to probe the input image. A structuring element is a matrix that identifies the
pixel in the image being processed and defines the neighborhood used in the processing of each
Pixel.

PART-B
1. What is edge detection? Describe in detail about the types of edge detection
operation?(or) Explain how edges of different orientations can be detected in an
image?[NOV 2011& NOV 2012] &[Nov 2014][APR/MAY-19]

Detection of Discontinuities
1st order derivatives, produce thicker edge in an image. 2nd order derivatives detect fine detail
such as thin lines, isolated points and noise.

Types of detection:
1. Point detection
2. Line Detection
3. Edge detection
Edge detection is used for determining the discontinuities in gray level.

Edge:
An edge is a boundary between two regions with relatively gray level properties different.It is
a set of connected pixels that lie on the boundary between two regions.

1 .Ideal digital edge model:

An ideal image edge is a set of connected pixels in the vertical direction where edge of the
pixel is located at an orthogonal step transition in gray level.
Edges are blurred, due to optics, sampling and other image acquisition imperfections.

7
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

 Thick edges of ramp are inversely proportional to the degree of blurring in the edge.
 The thickness is determined by length of ramp. Length is determined by slope, in turn
determined by degree of blurring. Blurred image edges tends to be thick of sharp edge tend to
be thin.
Use of Operator:
1. First derivative operator-Gradient.
2. Second derivative operator-Laplacian

1. Edge detection in Istderivative image:


The first derivative image of the gray level is positive at the trailing edge, zero in the constant
gray level, & negative at leading edge of transition.
Magnitude of first derivative is used to identify the presence of edge in image.
Gradient operators:
The gradient of an image f(x, y) at location (x, y) is defined as,

Magnitude ofgradient vector∇𝑓 is given by,

|∇𝑓| =

∇𝑓is commonly known as gradient

The direction of gradient vector is given by,


𝐺𝑥
𝛼(𝑥, 𝑦) = tan−1( )
𝐺𝑦

There are different types of gradient operators:-

8
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

(i). Prewitt gradient operator:

Generally 3x3 image I s taken as below.


P1 P2 P3

P4 P5 P6

P7 P8 P9

3x3 Images Prewitt Mask for horizontal detection

-1 -1 -1

0 0 0

1 1 1

Prewitt mask for vertical detection

-1 0 1

-1 0 1

-1 0 1
Gx edge detection in Horizontal detection
Gx = (P7 + P8 + P9) – (P1 + P2 + P3)
Gy = (P3 + P6 + P9) – (P1 + P4 + P7 )
(Edge detection in vertical detection)
Where P1 ……. P9 Pixel values in subimage

(ii) Sobel Gradient operators:

P1 P2 P3

P4 P5 P6

P7 P8 P9
3x3 Images

Sobel Mask for horizontal detection


9
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

-1 -2 -1

0 0 0

1 2 1

Sobel mask for vertical detection

-1 0 1

-2 0 2

-1 0 1
For horizontal detection
Gx = (P7 + 2P8 + P9) – (P1 + 2P2 + P3)
To find Gy:-
Gy = (P3 + 2P6 + P9) – (P1 + 2P4 + P7)

(iii). Roberts Gradient operators:-


-1 0
0 1
Gx
0 -1
1 0
Gy
Gx = P9 – P5
Gy= P8 – P6

2. Second Derivative operator:


Laplacian operators:-
The second derivative is
1. Positive at the transition related with the dark side of the edge.
2. Negative at the transition are bright / light side of the edge.
Uses:
1. It is used to differentiate the dark and bright level.
The Laplacian of a 2D function f(x, y) is a second order derivative is given by,

10
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

The Laplacian response is sensitive to noise.


P1 P2 P3

P4 P5 P6

P7 P8 P9
3x3 Images
Laplacian Mask
0 -1 0

-1 4 -1

0 -1 0
For 3x3 images, the Laplacian operator is given below

The coefficients associated with center pixels are positive & negative.
Sum of coefficients is zero.
Drawbacks:
1. It is highly sensitive to noise.
2. Its magnitude produces double edges, which makes the segmentation difficult.
3. It is unable to detect edge detection.

Laplacian can be used for two purposes:


1. To find whether the pixel is on the dark / light side of an edge.
2. To find edge location using zero crossing property.

Zero crossing property of Second order derivative:


An imaginary line joining the extreme +ve and –ve values of the second derivative would cross
zero near the midpoint of the edge. This property is quite useful for locating the centre of thick
edges.

2. Explain in detail about the process of edge linking and boundary detection? (Or) How
do you link edge pixels through global processing? (May/June-2013)(Or) how do you link
edge pixels through hough transform. {May 2015] (NOV/DEC-18)

Linking the edges of an image is done by edge linking and boundary detection.

11
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

The following techniques are used for edge linking and boundary detection.
1). Local processing.
2). Global processing using Hough transform.
3). Global processing using graph theoretic approach.

1) Local processing:-
One method for linking edges is to analyze the characteristic pixel in small neighborhood
about every point in an image.

Two properties in this analysis are:-


(i). the strength of the response of gradient operator used to produce the edge pixel.
(ii). the direction of gradient vector.

2) Global processing via Hough transform:-

Edge linking via hough transform(NOV/DEC 16)


In this method, global relationship between pixel are considered and the points are linked by
first determined whether they lie on a curve (or) a specified shape
Finding straight line point:
Let there are n-points in an image if the subset of points that lie on the straight line are to be
found.
Method 1:
First find all lines determined by every pair of points then find all subset of points that are close
to particular line.
Method 2:
 This is an alternative approach to method 1 which is referred as hough transform
 Consider a point xi, yi the general equation of straight line.yi= axi+ b
 now the number of lines passed through the xi and yi for different values of a and b
 consider a second point xi, yi also has a line. Let this line intercept the line (xi, yi)

There are ‘n’ points in an image. We have to find the subsets of points that lie on standard
lines.
One possible solution is to first find all lines. They are determined by every pair of points &
then find all subsets of points that are close to particular lines.

 First find and then perform comparisons of every point on to


all lines.
 Consider a point (xi, yi) and general equation of a standard line in slope – intercept form.
yi = axi + b
12
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

 Infinitely many lines past through (xi, yi) but all satisfy the equation yi = axi + b

 For varying a & b. However writing this equation as b= -axi + yi and considering ab plane
yields the equation of a single line for fixed pair (x i, y i). Further a second point (x i , y i ) also
has a lines in parameter space associated with it and this line intersects the line associated with
(x i , y i ) at (a’, b’)
[where a’ – slope & b’ – intercept of line]
y b’

The computational bminattractiveness bmaxof the Hough transform arises from subdividing the
parameter space into Accumulator cells.

Accumulator cells:
An important property of Huff transform is that the parameter space can be subdivided into
cells which is referred as accumulator cells.

Procedure:
1) Compute the gradient of an image and threshold
2) Specify subdivision in the plane
3) Examine the count of accumulator cell for high pixel concentration
4) Examine the relationship between the pixels
13
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

Applications:
1) In addition to straight line, Huff transform has applied to any function
2) Huff transform can be used to detect curves without any simple analytical representation.

3. Explain the concept of thresholding in image segmentation and discuss the merits and
limitations? [NOV 2008]
This is the important technique used for image segmentation. It is used to separate the
objects present in an image from its background.
Basic concept:-
Let us consider histogram of an image f(x, y) which consist of light objects on a dark
background.
Types:
1. Single thresholding
2. Multilevel thresholding.
1. Single thresholding
Dark background Object

The histogram consists of two dominant regions one for dark background & other for
object.
T is used for represent the threshold value. If f(x, y) >T, then corresponding point is
known as object point & otherwise if f(x,y)<=Ts/2, the point known as background point.

2. Multilevel thresholding:
Now we can consider the histogram which corresponds to the two different light objects on
dark background. T1&T2 are 2 threshold values as shown in fig.

14
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

Dark background Object 1 Object 2

T1 T2

 If T1 < f(x, y) ≤ T2, then point (x, y) is corresponds to object1.


 If f(x, y) ≥ T2, then point (x, Y0 corresponds to object2.
 If f(x, y) ≤ T1, then point (x, y) corresponds to background.
 Here two Threshold values are used. So it is known as multilevel thresholding. It is
not so reliable compared with single thresholding.
 The associated parameter of T is given by.
f(x, y) is gray level at any point (x, y).
 P(x, y) is local properly at any point.
 The threshold image g(x, y) is given as

0 – Indicates background
1 – Indicates objects
Thresholding is divided into three types:
1. Global thresholding.
2. Local thresholding.
3. Adaptive and dynamic thresholding.

1. Global thresholding.
If T value depends only on gray levelf(x, y) then the threshold technique is known as global
thresholding.
2. Local thresholding.
If T depends on f(x, y) & P(x, y) then the threshold technique is known as local
thresholding.

15
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

3. Adaptive and dynamic thresholding


If T depends on (x, y), P(x, y) & f(x, y) then the threshold technique is called as dynamic
thresholding.

Optimal thresholding:-
If an image has 2 main brightness regions then
P(z) = Probability density function of gray level values in an image.
Overall P(z) = sum of two densities
= (Density for light region + Density for dark region)
If the density function is a known value, then optimal threshold for segmenting the image
into two brightness regions can be determined.
Overall P(z) = P1 x P1 (z) + P2 x P2 (z)
m1 , m2 - mean values for two brightness level.
σ1 , σ2 - SD of mean
P1 , P2 - Probability of 2 gray levels.

The Probability of error to classify an object point as background point is given as,

The Probability of error to classify the background point as object point is given as,

The overall Probability of error is given as

If P1 = P2, then nth optimal threshold is the mean average & it is given by,
Where, T – Optimal threshold,

Threshold selection based on boundary characteristics:-


The pixels lie on concepts the boundary between the objects and background are
considered improve the histogram.
By doing this the threshold selection will be improved.
A three level, the image, can be formed, using the gradient

16
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

Where, 0 Pixel not on the edge.


+ Pixel on dark side of edge
- Pixel on Light side edge
Transition from light background to dark object is represented by “-“followed by “+”.
Transition from object to background is represented by “+” followed by ”-“.

Use for motion in segmentation process:-


Generally two approaches to apply motion in segmentation process. They are
1). Spatial domain approach
2). Frequency domain approach

4. Explain in detail about region growing process in detail? [APRIL 2010, May-2013] (or)
Explain region based segmentation and region growing with an example.(OR) Discuss
how the seed points are used for region growing and how image segmentation can be
done by splitting and merging the region of image? [May 2015](N/D 16, 17) [A/M-19, 21]

Region: Similar pixels are grouped together to form regions.


The process of dividing an image into smaller regions is based on some predefined rules.

Basic rules for segmentation:-


Let R be the entire image region R is subdivided into n number of sub regions.

(1).
(2). Ri is a connected region for i=1, 2 … n,all the pixels in the region should be connected.
(3). Ri∩ Rk = Ф for all i & k, where i ≠ k. this shows that region must be disjoint. No pixel
should be presenting two different regions.
(4). P(Ri) = true, for i=1, 2, ………n, all pixels in region R i have same intensity levels.
(5). P(Ri URk) = false, for i ≠ k, this shows that R i&Rk are different. The pixels in two
adjacent regions should not have same intensity.
Steps:
1. Find seed points.
2. Find the similarity pixels.
3. Find the stopping point.

17
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

 Region growing is a process of rating pixels or sub regions into larger regions based on pre-
defined similarity criteria.
 This approach starts with a set of start point known as “seed points”. Then the neighbouring
pixel having property that is similar to the seed are added to each seed. Thus new regions are
grown.
Similarity criteria:
It is based on intensity value, texture, color, size, and shape of the region being grown.

1. Selection of Seed points:


When no prior information is available if the result of these computation forms
cluster(group)then the pixels with property near the centroid of the cluster can be selected as
seed point(starting point).
2. Selection of Similarity criteria:
For the color images, the problem is very difficult within prior information.
For monochrome images descriptors and connectivity property should be considered for
similarity criteria.
3. Formulation of stopping groups:
Region growing should be stopped when there is no more pixels which satisfy the similarity
criteria for the particular region.
Region growing by pixel Aggregation:-
A set of seed points are used as starting point. Regions grow by appending from staring point
(neighbor pixels have similar properties).
 Algorithm starts with selection of seed pixel & desired predicate P(Ri) to compare with
neighboring pixels.
 The eight neighboring pixels of the seed pixel are assigned to region R1, if these pixels meet
the predicate requirement.
 This process of comparing eight neighboring pixels will be continued until no further pixels
are added to the region. The region R1 is completely defined.
 A new seed pixel is located within another area of image and same procedure is repeated
until all pixels defining R2 is determined.
 Same procedure is repeated until the all regions have been defined.
 Seed pixel is located by scanning the image pixel which has max or min gray level.
For eg:
Let us consider 5x5 image pixels for the threshold value of 3 (Th = 3)

1 0 5 6 7
1 0 5 5 5
0 12 6 77 6
1 2 5 6 7
18
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

1 1 7 6 5

 Values inside the boxes are gray level .Two seeds are 2 & 7.
 The location of 2 is (4, 2) & the location of 7 is (3, 4).
 These are the starting points. Then the regions are grown.
Here Th = 3
The absolute difference between gray level of that pixel and the gray level of seed must be
less than the threshold values

R1 R1 R2 R2 R2
R1 R1 R2 R2 R2
R1 R1 R2 R2 R2
R1 R1 R2 R2 R2
R1 R1 R2 R2 R2

Region 1 Region 2

5. Explain the principle of Region splitting and merging in details. [APRIL 2010, NOV
2011, May-2013, NOV 2012) (May/June 17)[NOV/DEC-18] &[May 2021]
 Region splitting and merging is a segmentation process in which an image is initially
subdivided into a quadrant and then the regions are merged (or) splitted to satisfy the basic
conditions.
 In this technique, the image is divided into various sub images of disjoint regions and then
merges the connected region together.
 R – be the entire region of the image.
 The predicate P(Ri) is used to check the condition. In any region, if P(Ri)= true, then image
is subdivided into various subimages.
 If P(Ri) = false, then divide the image into quadrants. If P(Ri) = false, then further divide the
quadrants into sub quadrants.
R1
R11 R12
R2
R13 R14
R3 R4
Region R11 is divided into quadrants.

Quad tree:
A Quad tree is a tree in which the nodes have exactly four descendants (Followers).
This is shown in quadrants representation as shown below

19
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

Quadtree representation
Example for split & merge algorithm is shown below:-

Initially image is divided into 4 regions R1, R2, R3 & R4


R11 R12 R21 R22 R31 R32xxx xxxxxxR R42
xxx 41

R13 xxxxxxx R23 R24 R33 R34 R43 R44


R14
xxxxxx

R1 R2 R3 R4

 R1, R2, R3, R4 region are divided into 16 sub region.


 In this region R2, R23 can be further sub divided as shown below.
R231 R232

xxxxxx xxxxxx
R233 R234
xxxxxx xxxxxx

Quad tree representation is shown below:-

20
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

Let R regions of the original image.


 In the next level, the original image is divided into 4 non – overlapping regions. The next
level is the sub division of these 4 regions into 4 smaller regions.
 The final level showing the sub division of R23 into 4 regions.
 The process of splitting an image into small regions and then merging connected regions
together is known as regions segmentation by splitting and merging.

Advantages:
It uses the same quad tree for splitting and merging.
6. Compare restoration with image enhancement. (Nov 2014) (8 marks)

S.NO IMAGE ENHANCEMENT IMAGE RESTORATION


1. It’s a subjective process. It’s objective is based on sound
mathematical principles.
2. It involves only cosmetic changes in the It requires modeling of the degradations.
brightness and contrast.
3. Often this is trial and error process.The The restoration algorithm is well defined.
enchancement procedure is heuristic.
4. The procedure is very simple. The procedure is complex.
5. It increases the quality of an image. It’s related to image enchancement.
6. Have prior knowledge about the Does not need the prior information.
information.
21
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

7. Computation speed is low. Computation speed is high.


8. Identifying and analysing of degraded Difficult.
pixel is easy.
9. Losses are minimum. Losses are high compare to
enchancement.

7. Explain in detail about segmentation by morphological watersheds? (or)write


morphological concept applicable for image processing . [NOV 2011] &[Nov 2014]
(NOV/DEC-17)

Image segmentation is based on three principle concepts:-


1). Detection of discontinuities
2). Thresholding
3). Region processing

Morphological watershed image segmentation embodies many of the concepts of above 3


approaches.
Often produces more stable segmentation including continuous segmentation boundaries.
It provides a simple framework for incorporating knowledge based constraints.

Basic concept:
Image is visualized in 3 dimensions
1) Two spatial dimensions.
2). Gray level
Any gray tone image may be considered as topological surface.

Topological interpretation consists of 3 points.


1). Points belonging to regional minimum.
2). Catchment basin.
3). Divide lines or watershed lines.

The main aim of the segmentation algorithm based on this concept is to find watershed lines.

Catchment basins:-
Points at which water drop, if placed at locations of any of those points would fall to single
minimum is called as watershed lines.

22
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

Watershed lines:-
 Points at which water drop would fall more than one such minimum is called as watershed
lines.
 A line is build to prevent the rising water from, distinct catchment basins form merging.
 Only the taps of down are visible above the water line.
 These dam boundaries correspond to the divide lines of water sheds.
 They are the connected boundaries by watershed segmentation algorithm.
 In order to prevent structure, higher height dams are calculated.
 The value of height is determined by highest possible gray level value in the input image.

Concepts of Erosion and Dilation in morphological processing.

These operations are fundamental to morphological processing.

(i) Erosion:

With A and B as sets in Z2, the erosion of A by B, denoted A Ɵ B, is defined as

 In words, this equation indicates that the erosion of A by B is the set of all points z such
that B, translated by z, is contained in A. In the following discussion, set B is assumed to be a
structuring element.

 The statement that B has to be contained in A is equivalent to B not sharing any common
elements with the background; we can express erosion in the following equivalent form:

 where, Ac is the complement of A and Ø is the empty set.

23
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

 Figure 9.4 shows an example of erosion.

 The elements of A and B are shown shaded and the background is white.
 The solid boundary in Fig. 9.4(c) is the limit beyond which further displacements of the
origin of B would cause the structuring element to cease being completely contained in A.
 Thus, the locus of points (locations of the origin of B) within (and including) this
boundary, constitutes the erosion of A by B.
 We show the erosion shaded in Fig. 9.4(c).
 Keep in mind that that erosion is simply the set of values of z that satisfy Eq. (9.2-1) or
(9.2-2)
 The boundary of set A is shown dashed in Figs. 9.4(c) and (e) only as a reference; it is
not part of the erosion operation.
 Figure 9.4(d) shows an elongated structuring element, and Fig. 9.4(e) shows the erosion
of A by this element. Note that the original set was eroded to a line.
 Equations (9.2-1) and (9.2-2) are not the only definitions of erosion (see Problems 9.9
and 9.10 for two additional, equivalent definitions.)
 However, these equations have the distinct advantage over other formulations in that
they are more intuitive when the structuring element B is viewed as a spatial mask (see Section
3.4.1).

Thus erosion shrinks or thins objects in a binary image. In fact, we can view erosion as a
morphological filtering operation in which image details smaller than the structuring element
24
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

are filtered (re-moved) from the image. In Fig. 9.5, erosion performed the function of a "line
filter."

(ii) Dilation

With A and B as sets in Z2, the dilation of A by B, denoted A B, is defined as

 This equation is based on reflecting B about its origin, and shifting this reflection by z
(see Fig. 9.1).
 The dilation of A by B then is the set of all displacements, z, such that B and A overlap
by at least one element. Based on this interpretation, Eq. (9.2-3) can be written equivalently as

 Equations (9.2-3) and (9.2-4) are not the only definitions of dilation currently in use (see
Problems 9.11 and 9.12 for two different, yet equivalent, definitions).
 However, the preceding definitions have a distinct advantage over other formulations in
that they are more intuitive when the structuring element B is viewed as a convolution mask.
 The basic process of flipping (rotating) B about its origin and then successively
displacing it so that it slides over set (image) A is analogous to spatial convolution, as
introduced in Section 3.4.2.
 Keep in mind, however, that dilation is based on set opera- tions and therefore is a
nonlinear operation, whereas convolution is a linear operation.
 Unlike erosion, which is a shrinking or thinning operation, dilation "grows" or
"thickens" objects in a binary image.
 The specific manner and extent of this thickening is controlled by the shape of the
structuring element used.
 Figure 9.6(a) shows the same set used in Fig. 9.4, and Fig. 9.6(b) shows a structuring
element (in this case B = B because the SE is symmetric about its origin).
 The dashed line in Fig. 9.6(c) shows the original set for reference, and the solid line
shows the limit beyond which any further displacements of the origin of B by z would cause
the intersection of B and A to be empty.
 Therefore, all points on and inside this boundary constitute the dilation of A by B.
 Figure 9.6(d) shows a structuring element designed to achieve more dilation vertically
than horizontally, and Fig. 9.6(e) shows the dilation achieved with this element.

25
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

8. Discuss how the water flooding and Dam construction is related to watershed
segmentation. [May 2021]
The concept of watersheds is based on visualizing an image in 3 dimensions:-
1). Two Spatial coordinates Vs Intensity.
In topographic interpretation, we consider 3 types of points:-
1). Points belonging to a regional minimum.
2). Points at which a water drop placed at the location of any point would fall to
single minimum.
3). Points at which water would fall to more than one such minimum.
The set of points that satisfy the condition 2 is called as “catchment basin” or “watershed of
that minimum”.
The points satisfying condition 3 form crest line on surface and defined as watershed lines.
Dam construction is based on binary image, which are members of 2D – integer space.
The Dam must be built to keep water from spilling across the basins.
Let M1 & M2 be set of coordinates of the points in the two regional minima.
The set of coordinates of the points in the catchment basin associated with the two minima
in the flooding level n be Cn(M1) & Cn(M2) – let the union of these sets be C[n].

26
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

Fig a shows operation of 2 catchment basin at flooding step n-1

27
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

 Fig b shows water has spilled between basins of a dam must be built to keep this
from happening.
 Now let q denotes the connected component formed in fig b by dilation from
flooding n-1 stage to n stage.
 Set of coordinates of points in catchment basins with these two minima at stage n-1
be denoted as
 Cn-1 (M1) & Cn-1 (M2) respectively.

The dilation of the connected component formed in the figure 3 is subjected to 2


conditions:-
1). The dilation has to be constrained to q. (the center of structuring element can be located
only at points of q during dilation).
2). The dilation can’t be performed on the set of points that may cause the sets being dilated
to merge.
Condition 1 is satisfied by every point during dilation and condition 2 didn’t apply to any
point during dilation in 1st figure.
 In figure 2 several points fail the condition 1, while meeting condition 2 resulting in
broken perimeter shown in fig.
 In fig, pixel cross – hatched path shows the desired separating dam at the nth stage of
flooding.
 Construction of dam at this level of flooding is completed by setting all the points in
the path just determined to the value greater than maximum gray level value.
 This method will eliminate the problem of broken segmentation lines.

9. Explain in detail about watershed segmentation algorithm? [MAY 2013]


Image is considered as topographic surface.
 Watershed are lines separating catchment basins belonging to different minima.
 This algorithm works if each local minima corresponds to an object of interest.
 Let M1, M2 ……. Mn are the set of coordinates of points in minima of the image g(x,
y).
 C(Mi) – coordinates of points of catchment basin associated with minima Mi.
T[n] = {(S ; t) | g(S, t)<n}
Where T[n] – set of points in g(x, y) which are lying below the planeg(x, y) = n
where, n – stage of flooding varies from min+1 to max+1

At any step n of flooding process, the algorithm needs to know the numbers of points below
the flood depth.
 The coordinates in T[n} that are below the plane g(x, y) =n are marked as black, and
all other coordinates marked as white.
28
EC8093- DIP UNIT IV – IMAGE SEGMENTATION

 Then we will see the binary image on xy plane at any increment n of flooding.
Let Cn(M1) be set of points in catchment basin associated with M1.
Cn(Mi) = C(Mi) ∩ T[n]
Where, Cn(Mi) = 1 at location (x, y) if (x, y) ε C(Mi) and (x, y) ε T[n], otherwise it is 0.
C[n] be the union of flooded catchment basin portions at stage n.

 Algorithm keeps on increasing the levels of flooding, Cn(Mi) & T[n] remains
constant or increase.
 Algorithm initializes C[min+1] = T[min +1] and then proceeds recursively.
 Let Q be set of connected components in T[n].
For each connected component, q ε Q[n]
There are 3 possibilities:-
(a). q ∩ C[n-1] is empty.
(b). q ∩ C[n-1] contains one connected component of C[n-1]
(c). q ∩ C[n-1] contains more than one connected component of C[n-1].

 Condition (a) occurs when a new minima is encountered in this case, Q is added to
set C[n-1] to form C[n].
 Condition (b) occurs when q lies within a catchment basin of some minima.
 Condition (c) occurs when ridge between two catchment basin.
 A one pixel thick dam can be constructed when needed by dilating q ∩ C[n-1] with
3x3 matrix of 1’s.
 Histogram of g(x, y) can be used to evaluate min, max and these values.
Region is characterized by small variations, so watershed segmentation is applied.
Drawbacks:
 Sensitivity to noise
 Low contrast boundaries
 Poor detection of thin edges

29

You might also like