You are on page 1of 37

Image Segmentation

Achmad Fauzi R Pina Hariyanti


Aldo Pratama Lianto Rahmat Arasy
Dhimas Permana Rendi Chevi
Dymiargani Syahrul Ramdani
Guntur Prayogo
Izra Halim
Outline Image Segmentation
• Introduction
• Image preprocessing and acquisition artifacts
• Partial volume effect
• Intensity nonuniformity (INU)
• Thresholding
• Shape-based histogram techniques
• Optimal thresholding
• Edge-based techniques
• Border tracing
• Graph searching
• Dynamic programming
• Advanced border detection methods
• Hough transforms
• Region-based segmentation
• Region growing
• Region splitting and merging
• Connected component labeling
Introduction
• Image segmentation is the separation of the image into
regions, is one of the first steps leading to image analysis and
interpretation.
• Involve the detection of organs (heart, the liver, or the lungs)
from MR or CT images, calculation of white and gray matter
volumes in MR brain images, the labeling of deep brain
structures, or quantitative measurements made from
ultrasound images.
• Image segmentation approaches can be classified according to
both the features and the type of technique used.
Image Preprocessing and
Acquisition Artifacts
• Image quality and acquisition artifacts directly affect the
segmentation process. artifacts that affect MR
• Affect MR images are partial volume and intensity
nonuniformity.
Partial Volume Effect (PVE)
• The mixing of different tissue types caused by the finite spatial
resolution of the images.
• PVE causes edge blurring between different tissue types and
reduces the accuracy and reliability of measurements taken on
the images.
INU (Intensity nonuniformity)
• Intensity nonuniformity (INU), also commonly referred to as
shading artifact, refers to smooth, local changes in the image
Intensity introduced by the data acquisition technique
Continued…
• Correction of intensity nonuniformity is typically based on a
multiplicative model of the artifact:
N3 Algorithm
Thresholding
• Merupakan metode segmentasi dengan membagi gambar
menjadi beberapa region berdasarkan nilai threshold yang
dapat diperkirakan menggunakan histogram.
• Threshold bisa lokal maupun global
• Teknik thresholding dapat dikategorikan menjadi dua yaitu
point-based dan region-based
• Menentukan nilai threshold dari intensitas histogram dapat
dikategorikan menjadi dua kelas yaitu shape-based and
optimal
Shape-based histogram
techniques
• Memilih nilai threshold sebagai nilai minimum antara dua
puncak histogram
• Untuk mengurangi sensitivitas terhadap noise, histogram bisa
diratakan atau mengurangi/menghilangkan pengaruh piksel
dengan nilai gradien yang tinggi, dengan pendekatan edge
detection atau dengan pendekatan lain yang dirumuskan
sebagai berikut :
Optimal thresholding
• Bergantung pada maksimalisasi atau minimalisasi merit
function
• Pada metode ini, histogram diasumsikan sebagai jumlah dari
distribusi normal
• Metode optimum dapat diklasifikasikan menjadi dua yaitu
nonparametric dan parametric
Optimal thresholding
• Non-parametric optimal thresholding
These method rely on the definition of a “goodness” criterion for
a threshold selection.

• Contoh implementasi non parametric optimal thresholding


adalah : Iterative Computation of Intensity Thresholding
Iterative Computation of
Intensity Thresholding
Optimal Thresholding
• Parametric optimal thresholding
Diasumsikan ada dua kelas yang distribusi gray levelnya dapat
dimodelkan dengan distribusi normal dengan mean μ dan
variance σ2

Nilai threshold optimum merupakan akar-akar dari persamaan


kuadrat sebagai berikut :
Optimal thresholding

Dimana :

Jika variancenya sama maka :

Jika Prior Probabilitasnya sama maka : T = average of the means


Edge-Based Segmentation
• Detecting the edges of an image by various operator could be
used to extract structure of interest in the image
• Terbagi atas :
• Border tracing
• Graph searching
• Dynamic programming
• Advanced border detection methods
• Hough transforms
Border Tracing
Applying border tracing algorithm to edge detection operator:

• Compute gradient vector at each pixel with horizontal and


vertical edge operator
• Compute gradient magnitude at each pixel
• If magnitude at a pixel exceeds a threshold, report a possible
edge point.
Border Tracing
The threshold mentioned is predetermined, and magnitude of each
pixel must fulfill the following inequalities:

For is the magnitude of edge pixel and is the magnitude


of neighboring edge pixel
Graph Searching (A* Algorithm)
• Graph searching method utilize A* Algorithm to find a pathway
(boundary) between multiple nodes (edge pixels)

• For applying graph searching method in edge detection, there


are some component that have to be taken into account:
1. Each candidate edge pixels represented as nodes
2. The connection between nodes is called link, which has a “cost”
that represent the intensity change calculated by edge operator
3. The pathway along starting nodes to end nodes is represent the
boundary of the image
Graph Searching
PATHS

START NODE

END NODE

LINKS

EDGE PIXEL NODES


Open/Closed List & Basic Principles

1. Link with the lowest cost is a more likely candidate for a closed
list node

Total cost of a node:


with h(n) is the cost from current node to closed list candidate

Total cost along a path:

2. Cost calculated by filtering the current node with edge operator,


lowest value indicating a less intensity change thus indicate a
more likely adjacent edge pixel

Starting Node 3. The tracing of the path is repeated until the the end node labeled
End Node
as a closed list
Open List/Closed List Candidate
Edge detecting with this method correspond to A* Algorithm
Graph Searching
improvement with Dynamic Programming

COST MATRIX CUMULATIVE COST MATRIX OPTIMIZED PATH

*Edge of image deduced


from dynamic programming
Advanced border detection
methods
Basic edge-based techniques described in this section have been
extended by several authors. Sonka et al propose a method by
which both sides of the coronary arteries are detected
simultaneously in coronary angiograms. Geiger et al use true 2D
dynamic programming for the detection and tracking of the left
and right heart ventricles. 2D dynamic programming has also
been proposed for rapid semiautomatic segmentation, a starting
point is specified and the cumulative cost and pointer matrices
are computed for every pixel in the search region (called live-
wire).
Advanced border detection
methods
Graph searching has also been used to detect borders in
sequences of images despite the fact that this technique does
not extend readily from 2D contour to 3D surface detection.
Another suboptimal, yet efficient, method for surface detection
has been proposed by Frank. First, a 3D cumulative cost matrix
that has the same dimension as the original image is created.
Once the cost matrix is created, it is traversed in reverse order.
The surface is computed by choosing, for each voxel,
predecessors that have minimum cost and meet connectivity
constraints.
Hough transforms

The Hough transform permits the detection of parametric curves


(e.g., circles, straight lines, ellipses, spheres, ellipsoids, or more
complex shapes) in a binary image produced by thresholding the
output of an edge detector operator

y = ax + b (x, y) in image space


b = -ax + y (a, b) in parameteric space
Hough transforms
But there is a problem in case a approaches infinity. To address this problem,
the normal representation of a line can be used:

The parameter r varies from to (M and N then dimension of


the image)
The angle θ varies form −90𝑜 to 90𝑜
Hough transforms

a circle described by the following equation

Often, the parametric representation of a shape of interest is not known. In this


case, the generalized Hough transform can be used. This technique builds a
parametric representation of a structure boundary from examples and it permits
the detection of this boundary, possibly rotated and scaled in new images
Region-based segmentation
Region-based techniques segment the image 'into regions &based on some
homogeneity property. This process can be formally described as follows:

P(.) = Logical Predicate


Ri,….,Rn = These equations state that the regions that need to cover the entire image
and that two regions are disjoint sets

Region-based segmentation terbagi menjadi :


• Region growing
• Region splitting and merging
• Connected component labeling
Region Growing

N(p) = set of immediate neighbor of the pixels


Region Splitting and Merging
• Dimulai dari Image keseluruhan
• Membagi (split) menjadi 4 sub-images (8 untuk image 3D)
ketika region tidak memenuhi kriteria homogen.
• Proses terus dilakukan hingga mendapatkan splitted sub-
images yang homogen.
• Representasi data -> Quadtree (1 induk memiliki 4 cabang
anak)
• Bermanfaat dalam penyimpanan data yang lebih efisien dan
memudahkan komparasi image.
Region Splitting and Merging

• Uniformity is determined on
the basis of homogeneity of
property as in the previous
examples. For a grey level
image, say, a region is said to be
statistically homogeneous if the
standard deviation of the
intensity less than some
threshold value, where the
standard deviation is given by,
Region Splitting and Merging
• Drawback: Banyak komponen dengan properties yang sama
pada final image partition.
• Solution: Menambahkan algoritma merging, menyatukan
partisi-partisi dengan properti yang sama.
• Final Algorithm:
Region Splitting and Merging
Connected Component
Labelling

->
Connected Component
Labelling
• goal is to label each pixel within a blob with the same label
number.
Connected Component
Labelling
Connected Component
Labelling
• Dealing with the
problem of multiple
label numbers per blob

You might also like