You are on page 1of 11

EC8093 DIGITAL IMAGE PROCESSING

UNIT IV IMAGE SEGMENTATION


Topics : Region based segmentation
Prepared by: Dr. R.Remya, M.E., Ph.D.
UNIT III
IMAGE SEGMENTATION
Edge detection, Edge linking via Hough transform – Thresholding - Region
based segmentation – Region growing – Region splitting and merging –
Morphological processing- erosion and dilation, Segmentation by
morphological watersheds – basic concepts – Dam construction – Watershed
segmentation algorithm.
REGION BASED SEGMENTATION
• Segmentation is the process of partitioning an image into multiple regions.

• Regions are a group of connected pixels with similar properties.

• A region in an image can be defined by its border (edge) or its interior.

• The interior can always define the border and vice versa.

Let R represent the entire image region.

• Partition the image R into sub-regions 𝑅1 , 𝑅2 , … … 𝑅𝑛 , such that

1. 𝑹𝒊 = 𝑹, all pixels must belong to a region.


2.𝑹𝒊 is a connected region for i=1,2,3, n, pixels in a region must be
connected.
3.𝑹𝒊 ∩ 𝑹𝒋 = ∅, ∀𝒊, 𝒋; 𝒊 ≠ 𝒋, regions must be disjoint.
4.𝑷(𝑹𝒊 ) = 𝑻𝒓𝒖𝒆, ∀𝒊 , all pixels must share the common property.
5.𝑷(𝑹𝒊 ∪ 𝑹𝒋 ) = 𝑭𝒂𝒍𝒔𝒆, ∀𝒊, 𝒋, 𝒊 ≠ 𝒋, and 𝑹𝒊 , 𝑹𝒋 are adjacent.
Cont..
Types:
• Region growing
• Region splitting and merging
REGION GROWING:
• It groups the sub-regions into larger regions based on predefined criteria.
Steps:
• An initial set of small areas is iteratively merged according to similarity constraints.
• Start by choosing an arbitrary seed pixel and compare it with neighboring pixels.
• Region is grown from the seed pixel by adding in neighbouring pixels that are similar,
increasing the size of the region.
• When the growth of one region stops, choose another seed pixel which does not yet
belongs to any region and start again.
• This entire process is continued until all pixels belong to some region. It is a bottom up
method.
Cont..
Algorithm:

f(x,y)=input array

S(x,y)= seed array containing 1’s at the loaction of seed points and ‘0’ elsewhere

Q= predicate to be applied at each loaction (x,y).

Assume f and S to be of same size.


1. Find all connected components in S(x,y) and erode each connected
component to one pixel, label all such pixels found as ‘1’. All other pixels in
S are labeled as ‘0’.
2. Form an image 𝒇𝑸 such that, at a pair of coordinates (x,y). Let 𝒇𝑸 𝒙, 𝒚 =
𝟏, if the input image satisfies the given predicate, Q at those coordinates,
otherwise 𝒇𝑸 𝒙, 𝒚 = 𝟎.
3. Let g be an image formed by appending to each seed point in S , all the 1-
valued points in 𝒇𝑸 that are 8-connected to that seed point.
4. Label each connected component in g with a different region label.
Cont..
• However starting with a particular seed pixel and letting this region grow
completely before trying other seeds biases the segmenattion in favour of
the regions whish are segmented first.

• This can have several undesirable effects.

• Current region dominates the growth process around edges of adjacent


regions may not resolved correctly.

• Different choices of seeds may give different segmentation results.

• Problems can occur if the seed point lies on the edge.


Cont..
Simultaneous region growing:

Similar neighbouring regions are considered for the region growing process.

No single region is allowed to completely dominate the proceedings.

A number of regions are allowed to grow at same time.

Similar regions will gradually combined to form a huge region

Advantage:

Easy and efficient to implement on parallel computers.


Cont..
REGION SPLITTING AND MERGING:

• Initially the image is subdivided into a set of arbitrary, disjoint regions and
then the regions are merged and splitted.

Basic principle:

• Let R=image

• In R, not all the pixels are similar, so the region is split in Q(R)= FALSE.

• Let all the pixels within each regions 𝑅1 , 𝑅2 , 𝑎𝑛𝑑 𝑅3 are similar, but 𝑅4 is
not.

• So 𝑅4 is split next.
Cont..
Quadtree:

Splitting of the image using a tree structure called quadtree, that is trees in
which each node has exactly four descendants.

The images corresponding to the nodes of a quadtree called as quad images or


quad regions.
Cont..
• If the process stopped only with splitting, the result may have adjacent
regions with identical properties.
• Therefore further merging as well as splitting is needed.
• When the combined pixels of adjacent regions satisfy the parameter Q, that
is two adjacent regions, 𝑅𝑗 𝑎𝑛𝑑 𝑅𝑘 are merged only if,

𝑄 𝑅𝑗 ∪ 𝑅𝑘 = 𝑇𝑅𝑈𝐸

Algorithm:
1. Split into four disjoint quadrants of any region 𝑅𝑖 , 𝑓𝑜𝑟 𝑤ℎ𝑖𝑐ℎ 𝑄 𝑅𝑖 =
𝐹𝐴𝐿𝑆𝐸.

2. When no further splitting is possible, merge any adjacent regions 𝑅𝑗 𝑎𝑛𝑑 𝑅𝑘


for which 𝑄(𝑅𝑗 ∪ 𝑅𝑘 ) = 𝑇𝑅𝑈𝐸.
3. Stop when no further merging is possible.
Thank you

You might also like