Professional Documents
Culture Documents
Imageprocessing
Imageprocessing
ImageProcessing
CHAPTER 4
4.1 Introduction
Any graph = ( , ) can be partitioned into two disjoint sets A, B provided that
| | is greater than 1. The degree of dissimilarity between the sets A and B is
addition of edge weights between nodes in A to nodes in B called as cut value.
( , )= ∑ ∈ , ∈ ( , ) (4.1)
Fig. 4.2 (a) Image pixels maintaining four neighborhood system, (b) Pixels corresponding to
cuts where thick lines represent discontinuities between neighboring pixels.
( , ) ( , )
( , )= + (4.2)
( , ) ( , )
where ( , ) is the sum of weights of edges removed to split the graph and
( , )and ( , ) are the sum of weights of edges in the nodes of P and
Q, respectively to all nodes in the original graph G. The Ncut of the disassociation
into the groups for small partitions of isolated points will be smaller, due to high
percentage of the entire connections between set and all other nodes.
3
Similarly total normalized association within the groups for given partition is
( , ) ( , )
( , )= + (4.3)
( , ) ( , )
= 2− (4.4)
Optimization of Ncut:
Let be graph with vertex set divided between two sets and then the
minimum Ncut for a graph with N nodes is calculated as below:
0 ⋯ 0
⎡ ⎤
⎢0 ⋯ 0⎥
ii. Let = ⎢ ⎥ be diagonal matrix of degrees and
⎢⋮ ⋮ ⋱ ⋮ ⎥
⎢ ⎥
⎣0 0 ⋯ ⎦
⋯
⎡ ⎤
⎢ ⋯ ⎥
= ⎢
⋮ ⎥
is affinity matrix then the minimum
⋮ ⋮ ⋱
⎢ ⎥
⎣ ⋯ ⎦
( − ) = (4.6)
The graph nodes are partitioned into two subsets using threshold value. The cut
can recursively be obtained in two partitioned parts and stops when it reaches to
previously given Ncut value. For given weighted graph G, summarize the
information into the affinity matrix W and degree matrix D. Solve ( − ) =
for eigen vectors with the smallest eigen value. Minimize Ncut using eigen
vector corresponding to the second smallest eigen value and bipartition the
graph by determining the point of division. The number of graphs partitioned by
this approach is controlled directly by the highest acceptable Ncut. This
technique is known as recursive two way cut [99].
‖ () ( )‖
∗ , ‖ − ‖ < (4.7)
0, ℎ
- Solve for the eigen vectors with the smallest eigen value of the system
( − ) = (4.8)
( − ) = (4.9)
- After computing the eigen vectors, split the graph into two parts using
the second smallest eigen vector.
These steps of Recursive two way cut are applied on a sample image as
shown in Fig. 4,3(a). The segmented image obtained by using second
smallest of the ninth eigen vector is as shown in Fig. 4.3(b).
Fig. 4.3 (a): Original image Fig. 4.3 (b): Segmented image
( , )= , < (4.10)
0, ℎ
∈ ( , )
( , )= , < (4.11)
0, ℎ
( , )= ( , ). ( , )+ ( , ) (4.12)
where is constant. For the larger radius r objects with weak contours can be
detected more easily however the graph affinity matrix turns into denser.
Segmentation quality is better for bigger graph radius, but speed is very slow.
Across larger image regions, extended range graph links helps transmission of
local grouping cues. In such situations, objects with weak boundaries can be
identified easily in messy background [102].
First, it defines the finest grid , and construct the series , , …, such that
∁ ∁…∁ ∁ . The principle of multi-grid method is relax on the fine
grid Ω and project error to course grid , and continues the relaxation and
projection on more course grid until the coarsest grid is obtained as shown in
Fig 4.5.
Benzit et al. [103] proposed the decomposition of multiple scales which seperates
graph links into different scales,
= + + + ⋯+ (4.13)
⋯ 0
= ⋮ , = ⋮ ⋱ ⋮ (4.14)
0 ⋯
To find the cross scale interpolation matrix , between the nodes in layer
and nodes in coarser layer as
1
, ∈
, ( , )= | | (4.15)
0, ℎ
, − ⋯ 0
= ⋮ ⋱ ⋱ ⋮ (4.16)
0 ⋯ ,, −
= 0 is segmentation constraint.
10
( )= ∑ (4.17)
This algorithm facilitates concurrently along the graph scales, with an inter-scale
restriction to guarantee communication and reliability between the segmentation
at every level. This segmentation approach is fit for segmenting large images but
To overcome this, Meyer [105] suggested hierarchical watershed with step given
below,
The flooding process starts with given threshold value that represents some
relief feature. So, some initial regions will be flooded which yields desired
number of partitions. The hierarchical watershed regions can be modeled using
graph. The flooded gradient image is represented by connected weighted
neighborhood graph, where node is the catchment basin of the topographic
surface. After conversion, one weighting function proposed in [105] can be used
as mean density.
( , )= (4.18)
12
Each graph may have several spanning tree but minimal spanning tree is the tree
with minimum weight. In MST of a graph, nodes are pixels and edges represent
affinities between the nodes that it connects. There are several algorithms to
construct minimal spanning tree. In Prim’s algorithm, MST is constructed by
adding the frontier edge with smallest weight. This algorithm is greedy style and
runs in polynomial time. Minimal Spanning Tree for an image is constructed as
shown in fig 4.6.
MST based segmentation is related to graph based clustering where the data is
13
edges. Most of the MST based approaches for segmentation emphasizes the
importance of Gestalt theory [7]. Earlier MST based methods perform image
between MST and cluster structure. Morris et al. [8] used MST to hierarchically
partition images based on the principle that most similar pixel should be together
and dissimilar pixels should be separated. They also proposed recursive MST
algorithm which splits up MST built from an image into many sub-trees
representing homogeneous regions such that each sub-tree should have certain
average gray levels. It yields low quality result in case of noisy images since
[106] using both the differences across the sub-graph and the differences inside
the sub-graph. The internal difference of a segment is the highest weight in the
( ) where e = MST (S, E). An edge with minimum weight among edges
Two segments can be merged if difference between them is less than or equal to
with smallest weight which connects and . From (4.10) we can see that
14
algorithm is sensitive to edges in smooth areas and less sensitive to areas with
by this method is neither too coarse nor too fine. Since two segments are merged
on the basis of single low weight edge between them, there are possibilities that
not done properly. To improve performance, Fahad et al. [108] suggested some
algorithm is used to build MST for segmentation which reflects global properties
between two regions. They have modified the algorithm by reducing the number
of edges required for sorting which produces an over segmented result and
perplexed imaging environment. Since MST based methods are very much
Finding the shortest path between two nodes is a classical problem in graph
theory. For connected weighted graphs, shortest path between pair of nodes is
the path whose total edge weight is minimum. The most well known algorithm
15
16
To find shortest path between nodes u and v, grow Dijkstra’s tree starting at the
node u, after each iteration add frontier edge whose non-tree end point is close to
v. After each iteration, node set of Dijkstra’s tree will be added with nodes to
which shortest path from u have been obtained.
In case of shortest path based segmentation methods, the problem of finding best
boundary segment is converted into finding the path with minimum cost
between the two nodes. In Live-wire method, initial point is selected by user and
the subsequent point is selected in such a way that the shortest path between
initial point and current position should be best fit to the object of interest [9].
Sequence of oriented pixel edges represents the boundary, where each oriented
edge has single cost value to measure the quality of boundary. The boundary
wraps around the object at real time speed. In comparison with tedious manual
tracing, Live-wire provides more accurate segmentation. Selection of proper
initial seed near the desired boundary is difficult tasks. Hence for blurred images
or weak boundaries implementation of Live-wire is difficult. While segmenting
high resolution images, Live-wire needs large number of computational
resources to search the shortest path over the whole graph. Live lane [10]
overcomes this limitation by liming the searching space in much smaller range of
5 to 100 pixels and largely reducing the computational time. Falcao et al. [11]
exploited some known properties of graphs to avoid the unnecessary shortest
path computation and proposed a fast algorithm called Live-wire-on-the-fly. The
speeding up of path searching is based on the fact that the results of computation
from the selected point can make use of the previous position of arrow. It has
advantage that there is no restriction on the shape or size of the boundary and
also the boundary can be oriented so that it has well defined inner and outer
parts of the boundary. Bai et al. [110] has developed Image region based
algorithm by using geodesic distance. Since the time complexity for geodesics is
in linear time, the algorithm can be implemented very efficiently, however it is
strongly dependent on the seed locations and is more likely to leak through weak
17
In comparison with MST based methods, the shortest path can well describe
certain nature of the object boundaries in an image since MST based methods
focuses on clustering property of a segment. To control segmentation process,
Live-wire provides more freedom to the user. Shortest path method might be
more suitable for extracting complex objects with relatively explicit boundaries
than other graph based methods. As a robust technique for interactive
segmentation, it can be extended to 2D sequences or 3D data.
There are many other graph based segmentation methods which does not belong
to above mentioned categories. Pyramid based methods proposed by [115, 116]
in which a graph is created from original image then from this graph, a set of
graphs defined in multi-level of resolutions is built, which looks like a pyramid.
Using reduction function, vertices and edges at level L are reduced to form the
vertices and edges at level L+1. Level of pyramid is called as working level which
is responsible to yield the segmentation. These methods are categorized into
regular pyramid and irregular pyramid based methods. For regular pyramids,
reduction factor which is the ratio between number of vertices at level L and at
level L+1 is constant and fixed. Hence the size and the layout of the structure of
pyramid is predictable. Gaussian filters with adjustable filter scales used by Ping
et al. [117] to utilize a pyramid built. Pyramid linking approach is used for
18
( , )= (4.20)
probability that random walker will go across an edge joining and . The label
of a pixel is given by the seed point where random walker will reach first. This
1
[ ]= − (4.21)
2
, ∈
19
shrinking bias. In comparison with graph cuts, random walker exhibits the
greatest robustness to seed quantity but least robustness to seed placement.
.
= 2 (4.22)
+
Experimental performance of image segmentation algorithms based on three
important characteristics: precision, recall and F-measure for five graph based
segmentation methods viz. pixel affinity, multiscale decomposition, watershed
regions, minimal spanning tree and shortest path is discussed. Fig. 4.8, 4.9, 4.10
and 4.11 represents precision and recall values for some images from Berkeley
Segmentation Dataset and Benchmark.
20
21
22
Table 4.1 shows the corresponding F-measure values for these images for all five
methods.
F – Measure
The Ncut algorithm first reads an image of size and constructs an intensity
feature values or the intensity values of the pixel. Then the graph function
computing . From (4.7), it can be observed that for smaller values of , weight
is less resulting into closely grouped pixels and more local segmentation and
vice versa. The tuning parameter controls degree of the spatial feature
23
= [ ( ( ), ). ( ( ), )] (4.23)
(18) will capture the correlation of neighboring features between pixel i and pixel
j while determining the weights of edges. For fixed radius, local variations of
features around j will be less for smaller values of ( ( ), ) . As well as for low
the aim of strong weight connections between the identical neighboring pixels in
complexity.
By using (4.23), we varied {1.0, 0.5, 0.1, 0.05, 0.01, 0.005} and observed
to the value of and its different values can give sound segmentations in
24
25
combines the individual scores from all local segmentations of each image in a
single final score. The results shown in fig. 4.13 demonstrate the final scores
obtained by using our approach for Ncut based segmentation methods. It shows
that multiscale graph decomposition performs better than other methods. The
For other Ncut based methods, our approach also achieves fairly good
Fig. 4.13: F-Measure for various images (208001, 3096, 196073, 78004, 54082)
Fig. 4.14 Time Complexity for various images (208001, 3096, 196073, 78004, 54082)
27
The graph based methods generally performs segmentation on the basis of local
properties of image. For segmenting the images in some applications where
detailed extraction of features is necessary, consideration of global impression
along local properties is inevitable. We have proposed an enhanced technique
which allows considering both, local as well as global features during
normalized cut based segmentation to meet the requirement of precise
segmentation. This was achieved by correlating the feature values around
neighboring pixels for determining weights of edges of the graph. This creates
strong weight connections between the identical neighboring pixels in the
affinity matrix resulting better segmentation quality with linear complexity. The
result shows that the final score of multiscale graph decomposition is superior to
the score obtained for other methods and even better than that of combining
hierarchical multiscale graph decomposition. The technique also has lesser
computational time complexity.
28