- Research
- Open access
- Published:

# Oriented relative fuzzy connectedness: theory, algorithms, and its applications in hybrid image segmentation methods

*EURASIP Journal on Image and Video Processing*
**volume 2015**, Article number: 21 (2015)

## Abstract

Anatomical structures and tissues are often hard to be segmented in medical images due to their poorly defined boundaries, i.e., low contrast in relation to other nearby false boundaries. The specification of the boundary polarity can help alleviate a part of this problem. In this work, we discuss how to incorporate this property in the relative fuzzy connectedness (RFC) framework. We include a theoretical proof of the optimality of the new algorithm, named oriented relative fuzzy connectedness (ORFC), in terms of an oriented energy function subject to the seed constraints, and show its usage to devise powerful hybrid image segmentation methods. The methods are evaluated using medical images of MRI and CT of the human brain and thoracic studies.

## 1 Introduction

Manipulating large amounts of data efficiently with high performance is today a complex task investigated by various scientific communities, as well by private sector corporations and government entities. Within this context, computational methods that make use of graphs as a basic element of study have played a key role in getting innovative solutions in various fields of knowledge, in particular in problem areas of computer vision and information visualization. Recent examples of applications that employ graph analysis in their processing pipelines are easily found in the literature such as: segmentation and classification of images via large-scale graphs [1,2], rearrangement and removal of overlaps in visual layouts, visualization and high-dimensional data clustering [3,4], among others. Thus, the modern theory of graphs is seen today as an indispensable tool to explore, analyze, and process large volumes of information, especially when it comes to digital images and high-dimensional data visualization, in view of its strong theoretical and mathematical support [5].

In this work, we explore graphs by modeling neighborhood relationships of picture elements from digital images for the purposes of image segmentation, such as to extract an object from a background, by assigning different labels to its picture elements. This labelling process is useful for many applications, such as medical and biological image analysis and digital matting, being a well-pursued topic in image processing and computer vision.

One important class of graph-based image segmentation methods comprises interactive seed-based methods, where the user provides a partial labelling of the image by placing hard region-based constraints (known as seeds). After that, the seed’s labels are propagated to all unlabeled regions by following some optimum criterion, such that a complete labeled image is constructed. This class encloses many of the most prominent methods for general purpose segmentation, which are usually easier to extend to multi-dimensional images, including frameworks, such as watershed from markers [6,7], random walks [8], fuzzy connectedness [9,10], graph cuts (GC) [11], distance cut [12], image foresting transform [13], and grow cut [14]. The study of the relations among different frameworks, including theoretical and empirical comparisons, has a vast literature [15-19], which allowed many algorithms to be described in a unified manner according to a common framework, which we refer to as generalized GC (GGC) [18,20]. Within this framework, in the discrete labelling case, there are two important classes of energy formulations, the *ε*
_{1}- and *ε*
_{
∞
}-minimization problems (and so, the associated algorithms), as discussed in [20].

In this work, we are interested in fast seed-based methods to efficiently deal with large amounts of data but which must also be versatile enough to support the inclusion of high-level, soft constraints. A soft constraint imposes a penalty on certain labelling assignments rather than prohibiting them. The penalty values allow the customization of the segmentation to different objects according to their expected high-level features (shape constraints, boundary polarity), which can be learned from a training dataset.

The most time-efficient seed-based approaches of the GGC framework are the ones that fall within the *ε*
_{
∞
}-minimization problem, which have linear time implementations *O*(*N*) with respect to the image size *N* [17], while the run time for the *ε*
_{1}-minimization problem is *O*(*N*
^{2.5}) for sparse graphs [21]. Recently, some methods from the *ε*
_{
∞
}-minimization family were extended to support the boundary polarity constraint, by exploring directed weighted graphs, leading to the method named *oriented image foresting transform* (OIFT) [22,23]. While the introduction of combinatorial graphs with directed edges on other frameworks increases considerably the complexity of the problem [24], the OIFT still runs in linear time. The boundary orientation/polarity helps to resolve between very similar nearby boundary segments with opposite transitions (dark to bright/bright to dark). The usage of directed weighted graphs also allows the incorporation of shape constraints as demonstrated in [25].

In this work, we discuss how to incorporate this orientation information, by exploring digraphs, in another member of the *ε*
_{
∞
}-minimization family, a region-based approach called relative fuzzy connectedness (RFC) [26]. RFC is an important method, which presents some nice theoretical properties, such as the robustness with respect to the seed choice [26]. The regions where the seeds are free to move without affecting the segmentation are called in some works as the *cores* [10]. In RFC, the cores for each seed coincide with its corresponding delineated regions by RFC. The cores of RFC are key elements in theoretical analysis to support effective semi-automatic correction (i.e., to fix a poor automatic segmentation in an interactive tool [27,28]), by finding a suitable set of seeds that assembles a given segmentation [10]. The RFC also has the advantage of producing a low false positive rate, which allows it to be combined with other methods in powerful hybrid approaches [29,30].

A short version of this work was published in a conference paper [31]. Here, the proposed method, named *oriented relative fuzzy connectedness* (ORFC), is presented in more details, including experiments involving large three-dimensional datasets, and showing the running time curves. We also extend the hybrid approach [29] to directed weighted graphs, incorporating the boundary polarity by combining the strengths of oriented relative fuzzy connectedness and graph cut. The novel hybrid approach is more robust than the original graph cut with respect to the seed choice (thus, avoiding ‘shrinking problem’ of GC), and it also outperforms the previous hybrid method [29] and OIFT, with running times close to linear.

Section 2 explains the basic concepts on image graphs and introduces the terminology and notation to be used throughout the text. Section 3 shows the original RFC. Section 4 presents the related oriented image foresting transform. The proposed extension of RFC, named oriented relative fuzzy connectedness, is presented in Section 5, and its applications in hybrid image segmentation (ORFC and graph cut) are shown in Section 6. Sections 7 and 8 discuss the experimental results and conclusions.

## 2 Background

A multi-dimensional and multi-spectral image \(\hat {I}\) is a pair \((\mathcal {I},\vec {I})\) where \(\mathcal {I}\subset Z^{n}\) is the image domain and \(\vec {I}(a)\) assigns a set of *m* scalars *I*
_{
i
}(*a*), *i*=1,2,…,*m*, to each pixel \(a\in \mathcal {I}\). The subindex *i* is removed when *m*=1.

An image can be interpreted as a weighted digraph *G*=〈*V*,*E*,*w*〉 whose nodes *V* are the image pixels in its image domain \(\mathcal {I}\subset Z^{n}\) and whose arcs are the ordered pixel pairs 〈*a*,*b*〉∈*E*. For example, one can take *E* to consist of all pairs of pixels 〈*a*,*b*〉 in the Cartesian product \(\mathcal {I} \times \mathcal {I}\) such that *d*(*a*,*b*)≤*ρ* and *a*≠*b*, where *d*(*a*,*b*) denotes the Euclidean distance and *ρ* is a specified constant (e.g., 4-neighborhood, when *ρ*=1, and 8-neighborhood, when \(\rho =\sqrt {2}\), in case of 2D images). The digraph *G* is symmetric if for any of its arcs 〈*a*,*b*〉, the pair 〈*b*,*a*〉 is also an arc of *G*. Each arc 〈*a*,*b*〉∈*E* has a fixed weight *w*(*a*,*b*)≥0, between neighboring pixels, which is ideally designed to have lower values in the boundary transitions of the object of interest (e.g., *w*(*a*,*b*)=*K*−|*I*(*a*)−*I*(*b*)|, where *K* is the greatest difference in image brightness for a single-channel image with values given by *I*(*a*)). A symmetric digraph is undirected weighted if *w*(*a*,*b*)=*w*(*b*,*a*) for all 〈*a*,*b*〉∈*E*; otherwise, we have a directed weighted digraph.

The transpose *G*
^{T}=〈*V*,*E*
^{T},*w*
^{T}〉 of a weighted digraph *G*=〈*V*,*E*,*w*〉 is the unique weighted digraph on the same set of vertices *V* with all of the arcs reversed compared to the orientation of the corresponding arcs in *G* (i.e., for any of its arcs 〈*a*,*b*〉∈*E*
^{T}, the pair 〈*b*,*a*〉 is an arc of *G*, and *w*
^{T}(*a*,*b*)=*w*(*b*,*a*)). A weighted digraph *G* is symmetric and undirected weighted if *G* is the same as its transpose.

For a given image graph *G*=〈*V*,*E*,*w*〉, a path *π*
_{
a
}=〈*t*
_{1},*t*
_{2},…,*t*
_{
n
}=*a*〉 is a sequence of adjacent pixels with terminus at a pixel *a*. A path is *trivial* when *π*
_{
a
}=〈*a*〉. A path *π*
_{
b
}=*π*
_{
a
}·〈*a*,*b*〉 indicates the extension of a path *π*
_{
a
} by an arc 〈*a*,*b*〉. When we want to explicitly indicate the origin of a path, the notation \(\pi _{a \rightsquigarrow b}=\langle t_{1} = a,t_{2},\ldots,t_{n} = b \rangle \) may also be used, where *a* stands for the origin and *b* for the destination node. More generally, we can use \(\pi _{S \rightsquigarrow b}=\langle t_{1},t_{2},\ldots,t_{n} = b \rangle \) to indicate a path with origin restricted to a set *S* (i.e., *t*
_{1}∈*S*). A digraph is said to be *strongly connected* if there is a path from every vertex to every other vertex. A *connectivity function* computes a value *f*(*π*
_{
a
}) for any path *π*
_{
a
}, usually based on arc weights. A path *π*
_{
a
} is *optimum* if *f*(*π*
_{
a
})≥*f*(*τ*
_{
a
}) for any other path *τ*
_{
a
} in *G*.

For every weighted digraph *G*=〈*V*,*E*,*w*〉, consider the space \(\tilde {\mathcal {X}}\) of all functions *x* :*V*→ [ 0,1], referred to as *fuzzy subsets* of *V*, with the value *x*(*a*) indicating a degree of membership with which *a* belongs to the set. The family of all functions \(x \in \tilde {\mathcal {X}}\) with the only allowed values of 0 and 1 (i.e., *x*:*V*→{0,1}) will be referred to as the family of all *hard subsets* of *V*. Each \(x\in \mathcal {X}\) is identified with the true subset *P*={*c*∈*V*:*x*(*c*)=1} of *V*. Notice that, in such a case, *x* is the *characteristic function*
*χ*
_{
P
} of *P*⊂*V*. We usually restrict the collection of all allowable objects by indicating two disjoint sets, referred to as *seeds*: \(\mathcal {S}_{{o}} \subset V\) indicating the object and \(\mathcal {S}_{{b}} \subset V\) indicating the background.

This restricts the collection of allowable outputs of the algorithm to the family \(\mathcal {X}(\mathcal {S}_{{o}},\mathcal {S}_{{b}})\) of all \(x\in \mathcal {X}\) with *x*(*a*)=1 for all \(a\in \mathcal {S}_{{o}}\) and *x*(*b*)=0 for all \(b\in \mathcal {S}_{{b}}\). Note that \(\mathcal {X}(\mathcal {S}_{{o}},\mathcal {S}_{{b}})=\{\chi _{P} \colon \mathcal {S}_{{o}}\subset P\subset V\setminus \mathcal {S}_{{b}}\}\).

## 3 RFC

### 3.1 The original definition by connectivity functions

Next, we show the original RFC definition as proposed in [32] for undirected weighted graphs. Consider the following connectivity function:

where *w*
_{max}= max〈*a*,*b*〉∈*E*
*w*(*a*,*b*). Two connectivity maps are computed by using two executions of the image foresting transform (IFT) [13]:

where *Π*(*G*,*a*) is the set of all possible paths in the graph *G* with terminus at the node *a*. The segmentation \(A_{\text {RFC}}(\mathcal {S}_{{o}},\mathcal {S}_{{b}})\) of the RFC method is obtained by comparing the two maps of connectivity *V*
_{
o
} and *V*
_{
b
}, such that each pixel *a*∈*V* is labeled as belonging to the object only if *V*
_{
o
}(*a*)>*V*
_{
b
}(*a*) (Figure 1).

### 3.2 RFC as a *ε*
_{
∞
}-optimizer

The RFC method can also be seen as an optimum cut in the undirected weighted graph according to an appropriate objective function of graph cut, as discussed in [17,19,33].

For *q*∈ [1,*∞*] consider the energy functional \({\varepsilon }_{q} : \tilde {\mathcal {X}}\to [\!0,\infty)\), where, for every \(x\in \tilde {\mathcal {X}}\), *ε*
_{
q
}(*x*) is defined as the *q*-norm of the functional \(F_{x}\colon E\to {\mathbb R}\), given by the formula *F*
_{
x
}(*a*,*b*)=*w*(*a*,*b*)|*x*(*a*)−*x*(*b*)| for 〈*a*,*b*〉∈*E*. That is, \({\varepsilon }_{q}(x)= ||F_{x}||_{q}=\sqrt [q]{\displaystyle \sum _{{\langle } a,b{\rangle }\in E}\left (w(a,b)|x(a)-x(b)|\right)^{q}}\), for *q*<*∞*.

Notice that \(\lim \limits _{\textit {q}\to \infty }{\varepsilon }_{q}(x)={\varepsilon }_{\infty }(x)\), since *q*-norms converge, as *q*→*∞*, to the *∞*-norm.

Restricting the analysis to only binary solutions \(x= \chi _{P} \in {\mathcal {X}}\), we have:

where \({\mathcal {C}}(x) = \{ {\langle } a,b {\rangle } \in E : x(a) \neq x(b) \}\) is a set of cutting edges.

Let *ε*
_{
∞
↓
} be the minimum of the energy *ε*
_{
∞
}(*x*) over all allowable objects \(x\in {\mathcal {X}}({\mathcal {S}}_{{o}},{\mathcal {S}}_{{b}})\), that is, \({\varepsilon }_{\infty \downarrow }=\min \{{\varepsilon }_{\infty }(x) \colon x\in {\mathcal {X}}({\mathcal {S}}_{{o}},{\mathcal {S}}_{{b}})\}\). Any element of \({\mathcal {X}}_{\infty }({\mathcal {S}}_{{o}},{\mathcal {S}}_{{b}})=\{x\in {\mathcal {X}}({\mathcal {S}}_{{o}},{\mathcal {S}}_{{b}}) : {\varepsilon }_{\infty }(x)={\varepsilon }_{\infty \downarrow }\}\) will be referred to as an optimum energy solution of *ε*
_{
∞
} in \({\mathcal {X}}({\mathcal {S}}_{{o}},{\mathcal {S}}_{{b}})\). Any algorithm *A* that, given a graph and seed sets \({\mathcal {S}}_{{o}}\) and \({\mathcal {S}}_{{b}}\), returns an object, denoted by \(A(\mathcal {S}_{{o}},\mathcal {S}_{{b}})\), from \(\mathcal {X}_{\infty }(\mathcal {S}_{{o}},\mathcal {S}_{{b}})\) will be referred to as an *ε*
_{
∞
}-*minimizing algorithm*. The RFC algorithm is an *ε*
_{
∞
}-minimizing algorithm, that is, \(A_{\text {RFC}}({\mathcal {S}}_{{o}},\mathcal {S}_{{b}}) \in \mathcal {X}_{\infty }(\mathcal {S}_{{o}}, \mathcal {S}_{{b}})\) [29]. In the case of a single internal seed *s*
_{1} (Figure 2), we have the following alternative definition of RFC based on graph cut:

The case of multiple internal seeds is then treated using the following equation:

## 4 OIFT

A directed weighted graph is computed, where *w*(*a*,*b*) is a combination of a regular undirected similarity measure *δ*(*a*,*b*), multiplied by an orientation factor, as follows:

Several different procedures can be adopted for *δ*(*a*,*b*), such as the complement of the absolute value of the difference of image intensities (i.e., *δ*(*a*,*b*)=*K*−|*I*(*a*)−*I*(*b*)|), or the affinity functions discussed in [34,35]. Note that we have a directed weighted graph (*w*(*a*,*b*)≠*w*(*b*,*a*)) when *α*>0.

The oriented image foresting transform is build upon the IFT framework by considering the following path function in a symmetric digraph:

OIFT has two versions: \(A_{\text {OIFT}}^{in}(S_{{o}},S_{{b}})\) which favors transitions from dark to bright pixels, and \(A_{\text {OIFT}}^{\text {out}}(S_{{o}},S_{{b}})\) which has the opposite orientation. \(A_{\text {OIFT}}^{\text {in}}(S_{{o}},S_{{b}})\) is obtained by computing one IFT with connectivity function \(f_{\text {OIFT}}^{S_{{o}},S_{{b}}}\), and by taking as object pixels the set of pixels that were conquered by paths rooted in *S*
_{
o
}. \(A_{\text {OIFT}}^{\text {out}}(S_{{o}},S_{{b}})\) is similarly computed, but using \(f_{\text {OIFT}}^{S_{{b}},S_{{o}}}\).

One important thing to note is that the function \(f_{\text {OIFT}}^{S_{1},S_{2}}\) is a non-smooth connectivity function, as shown in [22]. When a path-value function is not smooth, the IFT will still return a spanning forest, but the paths may not be optimum [13]. However, the optimality of OIFT is still supported by an energy criterion of cut in graphs [22,23].

## 5 ORFC

Differently from RFC, the definitions of ORFC based on paths and based on cuts in the digraph lead to different results (Figures 3a,b). The different obtained algorithms will be denoted as \(A_{\text {ORFC}}^{\text {in},\rightsquigarrow }\) and \(A_{\text {ORFC}}^{\text {out},\rightsquigarrow }\) for the path-based definition and and for the cut-based definition.

### 5.1 ORFC definition by reverse connectivity functions

Based on the previous works [22,23], we consider the following new connectivity function in digraphs:

where 〈*b*,*a*〉 is an anti-parallel arc.

Note that \(f^{\not \parallel \:\mathcal {S}}_{\min }\) is a smooth function, and therefore, \(V_{{o}}^{\not \parallel }\) and \(V_{{b}}^{\not \parallel }\) are optimum connectivity maps. These two connectivity maps are generated by executing the IFT with anti-parallel connectivity functions:

Following the same key idea from [22] (i.e., to consider reversed connectivity functions for one of the seed sets), we have the following natural definition for ORFC: The segmentation \(A_{\text {ORFC}}^{\text {out},\rightsquigarrow }(S_{{o}},S_{{b}})\) favoring transitions from bright to dark pixels is obtained by comparing the connectivity maps *V*
_{
o
}(*a*) and \(V_{{b}}^{\not \parallel }(a)\), such that each pixel *a*∈*V* is labeled as belonging to the object only if \(V_{{o}}(a) > V_{{b}}^{\not \parallel }(a)\).

The segmentation \(A_{\text {ORFC}}^{{in},\rightsquigarrow }(S_{{o}},S_{{b}})\) favoring transitions from dark to bright pixels is obtained by comparing the connectivity maps \(V_{o}^{\not \parallel }(a)\) and *V*
_{
b
}(*a*), such that each pixel *a*∈*V* is labeled as belonging to the object only if \(V_{o}^{\not \parallel }(a) > V_{{b}}(a)\).

Note that although this ORFC version is based on optimum connectivity maps, its practical results have undesirable characteristics, such as the presence of disconnected regions and high false-positive rates, leading to unsatisfactory results (Figure 3a).

### 5.2 ORFC as a directed cut in the digraph

Given that the previous ORFC definition (Section 5.1) presents undesirable results, in this section, we present an alternative definition supported by a graph cut optimality criterion, which is motivated by the definitions from Section 3.2.

Differently from Section 3.2, in the case of directed graphs, we have two possible sets of cuts (Figure 4):

So we have two possible formulations for the energy functional of the *ε*
_{
∞
}-minimizing problem.

Let \({\varepsilon }_{\infty \downarrow }^{\text {out}}\) be the minimum value of the energy \({\varepsilon }_{\infty }^{\text {out}}(x)\), that is:

Similarly, for \({\varepsilon }_{\infty }^{\text {in}}(x)\), we have:

Therefore, we have the following sets of solutions:

The ORFC algorithms on digraphs have the following definitions based on cut in graph:For the outer cut ‘ out’ with one internal seed *s*
_{1},

and in the case of multiple internal seeds,

For the inner cut ‘ in’ with one internal seed *s*
_{1},

and in the case of multiple internal seeds,

### 5.3 ORFC algorithm based on graph cut

In order to show the proposed algorithms, we need the following definition:

###
**Definition**
**1** (Directed connected component).

For a given vertex *x* of a digraph *G*, the *directed connected component* of basepoint *x* is the set, denoted by DCC_{
G
}(*x*), of all the successors of *x* in *G* (i.e., all the nodes that are reachable from vertex *x* by some path).

Figure 5 illustrates the steps of Algorithm 1.

To prove the correctness of the above algorithms, we need the following lemma:

###
**Lemma**
**1**.

For a given weighted digraph *G*, and sets of seeds *S*
_{
o
} and *S*
_{
b
}, such that *S*
_{
o
}={*s*
_{
i
}}, we have that \({\varepsilon }_{\infty \downarrow }^{{in}} = V_{{b}}(s_{i})\), and \({\varepsilon }_{\infty \downarrow }^{out} = V_{{b}}^{\not \parallel }(s_{i})\).

###
*Proof*.

We will prove Lemma 1 for \({\varepsilon }_{\infty \downarrow }^{\text {in}} = V_{{b}}(s_{i})\), but the case \({\varepsilon }_{\infty \downarrow }^{\text {out}} = V_{{b}}^{\not \parallel }(s_{i})\) has an essentially identical proof. The proof is based on the following statement: (1) For the given strongly connected digraph *G*, if we remove all arcs 〈*a*,*b*〉, such that \(w(a,b)<{\varepsilon }_{\infty \downarrow }^{\text {in}}\), we then obtain a new digraph *G*
^{′} where there still exists a path from \({\mathcal {S}}_{{b}}\) to *s*
_{
i
} (i.e., \(\exists \pi _{t \rightsquigarrow s_{i}}\) where \(t \in {\mathcal {S}}_{{b}}\)).

This statement can be proven by contraction. Let *T* be the set of pixels reachable from \(\mathcal {S}_{{b}}\) in *G*
^{′} (i.e., \(T = \bigcup _{x \in {\mathcal {S}}_{{b}}} \text {DCC}_{G'}(x)\)). If there is no path from \({\mathcal {S}}_{{b}}\) to *s*
_{
i
} in *G*
^{′}, then we have that *s*
_{
i
}∉*T*. Therefore, we have a partition of the vertices into two disjoint sets *T* and *V*∖*T*. Note that its corresponding cutting arcs \({\langle } a,b{\rangle } \in {\mathcal {C}}_{\text {in}}(\chi _{V/T})\) all have \(w(a,b)<{\varepsilon }_{\infty \downarrow }^{\text {in}}\) in *G*. Consequently, \({\mathcal {C}}_{\text {in}}(\chi _{V/T})\) has a better cut value than \({\varepsilon }_{\infty \downarrow }^{\text {in}}\), which is a contradiction by Equation 18.

From statement (1), we may conclude that there is a path from \({\mathcal {S}}_{{b}}\) to *s*
_{
i
} in *G*, which is composed only by arcs \({\langle } a,b{\rangle } \colon w(a,b)\geq {\varepsilon }_{\infty \downarrow }^{\text {in}}\). Hence, the connectivity value *V*
_{
b
}(*s*
_{
i
}) of an optimum path from \({\mathcal {S}}_{{b}}\) to *s*
_{
i
} (Equation 2) cannot be lower than \({\varepsilon }_{\infty \downarrow }^{\text {in}}\), i.e., \(V_{{b}}(s_{i}) \geq {\varepsilon }_{\infty \downarrow }^{\text {in}}\) (2).

Consider the set of cutting arcs \({\mathcal {C}}_{\text {in}}(x_{\text {opt}})\) of an optimum solution \(x_{\text {opt}} \in \mathcal {X}_{\infty }^{\text {in}}(\{s_{i}\},{\mathcal {S}}_{{b}})\). By definition (Equations 16 and 18), we have that \(w(a,b) \leq {\varepsilon }_{\infty \downarrow }^{\text {in}}\) for all \({\langle } a,b{\rangle } \in {\mathcal {C}}_{\text {in}}(x_{\text {opt}})\). An optimum path \(\pi _{S_{{b}} \rightsquigarrow s_{i}}\), from \({\mathcal {S}}_{{b}}\) to *s*
_{
i
}, must necessarily pass through some arc of \({\mathcal {C}}_{\text {in}}(x_{\text {opt}})\). So its connectivity value \(f^{{\mathcal {S}}_{{b}}}_{\min }(\pi _{S_{{b}} \rightsquigarrow s_{i}}) = V_{{b}}(s_{i})\) cannot be greater than \({\varepsilon }_{\infty \downarrow }^{\text {in}}\), i.e., \(V_{{b}}(s_{i}) \leq {\varepsilon }_{\infty \downarrow }^{\text {in}}\) (3).

From the above conditions (2) and (3), we may conclude that the only valid configuration is \(V_{{b}}(s_{i}) = {\varepsilon }_{\infty \downarrow }^{\text {in}}\).

For the sake of simplicity, we will only discuss here the proof of correctness of the algorithm, in terms of Equation 23, where *s*
_{1}=*s*
_{
i
} and \({\varepsilon }_{\infty \downarrow }^{\text {in}}=V_{{b}}(s_{i})\) (Lemma 1). The algorithm for has an essentially identical proof.

First, we need to prove that the characteristic function \({\chi }_{O} of O = \text {DCC}_{G_{\le }^{T}}(s_{i})\) is an optimum solution in \(\mathcal {X}_{\infty }^{\text {in}}(\{s_{i}\},{\mathcal {S}}_{{b}})\). Note that, in the digraph \(G_{\le }^{T}\), there are no arcs from pixels in \(\text {DCC}_{G_{\le }^{T}}(s_{i})\) to pixels in \(V \backslash \text {DCC}_{G_{\le }^{T}}(s_{i})\); otherwise, the list of successors of *s*
_{
i
} in \(G_{\le }^{T}\), given by \(\text {DCC}_{G_{\le }^{T}}(s_{i})\), would not be complete. These arcs were removed in Step 2 of the algorithm and, therefore, have no values greater than \({\varepsilon }_{\infty \downarrow }^{\text {in}}\), so the characteristic function of \(\text {DCC}_{G_{\le }^{T}}(s_{i})\) must be an optimum solution in \(\mathcal {X}_{\infty }^{\text {in}}(\{s_{i}\},{\mathcal {S}}_{{b}})\).

The other conditions in Equation 23 force to constitute the smallest object in \({\mathcal {X}}_{\infty }^{\text {in}}(\{s_{i}\},{\mathcal {S}}_{{b}})\). Note that any object composed by a set of pixels *T*, such that there are arcs from pixels in *T* to pixels in *V*∖*T* in the digraph \(G_{\le }^{T}\), cannot be an optimum solution in \({\mathcal {X}}_{\infty }^{\text {in}}(\{s_{i}\},{\mathcal {S}}_{{b}})\) because these arcs have corresponding anti-parallel arcs in *G*
_{≤}, pointing toward object pixels, with values greater than \({\varepsilon }_{\infty \downarrow }^{\text {in}}\), leading to a worse inner cut. Since all proper subsets of \(\text {DCC}_{G_{\le }^{T}}(s_{i})\) still have some outgoing arcs in the digraph \(G_{\le }^{T}\) and, consequently, incoming arcs in *G*
_{≤}, we have that they are not optimum. Therefore, \(\text {DCC}_{G_{\le }^{T}}(s_{i})\) is the smallest optimum solution.

To solve the case of with multiple internal seeds, according to Equation 24, we need to repeat the execution of Algorithm 1 for each internal seed. However, the following proposition applies in the case of :

###
**Proposition**
**1**.

For a given digraph *G*=〈*V*,*E*,*w*〉 and seed \(s_{i} \in {\mathcal {S}}_{{o}}\), consider the residual digraph \(G_{s_{i}} = G_{\le } = {\langle } V,\{{\langle } a,b{\rangle } \in E \colon w(a,b) > V_{{b}}(s_{i}) \},w\rangle \) (step 2 of Algorithm 1). For any arbitrary seeds \(s_{1} \in {\mathcal {S}}_{{o}}\) and \(s_{2} \in {\mathcal {S}}_{{o}}\), if *V*
_{
b
}(*s*
_{1})≤*V*
_{
b
}(*s*
_{2}) and \(s_{2} \in DCC_{G_{s_{1}}^{T}}(s_{1})\), then we have that \(DCC_{G_{s_{2}}^{T}}(s_{2}) \subset {DCC}_{G_{s_{1}}^{T}}(s_{1})\).

If we sort the seeds *s*
_{
i
} in *S*
_{
o
} according to their *V*
_{
b
}(*s*
_{
i
}) values, then we can process the seeds in increasing order of values, allowing us to avoid the reprocessing of pixels by skipping the seeds that were already assigned to the object, greatly improving the running time.

One important thing to note is that ORFC encompasses RFC as a particular case whenever the parameter *α* is set to zero.

## 6 Hybrid segmentation: ORFC and graph cut

In this section, we follow the same key ideas from [29], which proposes a hybrid approach combining the strengths of relative fuzzy connectedness and min-cut/max-flow algorithm.

The GC natively supports the soft constraint of boundary polarity and will be denoted as oriented graph cut (OGC). It (\(A_{\text {OGC}}^{\text {out}}(S_{{o}},S_{{b}})\)) solves the *ε*
_{1}-minimization problem by considering the arcs that limit the flow from the source to the sink and consequently minimizes the sum of the arcs pointing from object to background pixels (i.e., the outer cut) [11]. The minimization of the sum of the arcs of the inner cut (\(A_{\textit {OGC}}^{\text {in}}(S_{{o}},S_{{b}})\)) can be obtained by inverting the source and sink nodes or by reversing all arcs by computing GC over the graph’s transpose *G*
^{T}.

Basically, by considering in [29] a directed weighted graph, with ORFC in place of RFC, we have the ORFC+GC hybrid approach (Figure 6) as follows:

Figure 7 illustrates the steps of Algorithm 4.

## 7 Experimental results

In the first experiment, we used 40 slice images from real MR images of the foot. We performed the segmentation of the bones calcaneus and talus for all the methods (IRFC [9], RFC [26], OIFT [23], RFC+GC [29], OGC [11] - the graph cut with boundary polarity, ORFC, and the proposed hybrid method ORFC+GC), for different seed sets automatically obtained by eroding and dilating the ground truth at different radius values. By varying the radius value, we can repeat the segmentation for different seed sets and trace accuracy curves using the dice coefficient of similarity and error curves of false positive (normalized by the object size). However, in order to generate a more challenging situation, we considered a larger radius of dilation for the external seeds (twice the value of the inner radius), resulting in an asymmetrical arrangement of seeds. In the second experiment, 40 slice images from CT thoracic studies of 10 subjects were used to segment the liver following the same procedure for seed selection (Figure 8). In all cases, the ground truth data was obtained from an expert of the Radiology Department at the University of Pennsylvania.

Several different procedures can be adopted for *δ*(*a*,*b*) [34,35]. For example, Figures 3 and 9 show some results for user-selected markers using the image-based weight assignment from [36]. For the sake of simplicity, in the quantitative experiments, we adopted the weight assignment *δ*(*a*,*b*)=*K*−|*G*(*a*)+*G*(*b*)|, where *G*(*a*) denotes the gradient magnitude of the Sobel operator. In Equation 8, *α* could be in the range of [0,1], we considered *α*=0.5 in all experiments involving OIFT, OGC, ORFC, and ORFC+GC and *α*=0.0 in the case of undirected approaches. The value *α*=0.5 is the default value adopted in experimental results [22,23], which is a more well balanced configuration. For low values (*α*≈0.0), the oriented methods (e.g., ORFC) degenerate into their counterpart undirected approaches (e.g., RFC), and for high values, the oriented methods may become more sensitive to noise. We used for the foot bones, since they present transitions from dark to bright pixels and for the liver, since it has the opposite orientation.

Figure 10 shows the accuracy and error curves, and Figure 11 shows the running time curves for all the methods. Since the considered objects are not expected to have holes, we considered a post-processing by closing of holes (CoH) [37] for RFC and ORFC. Indeed, RFC is known to potentially exclude regions inside the object that are surrounded by strong edges. Note that its oriented counterpart method, ORFC, also inherits this property.

In general, the results show that ORFC can achieve higher accuracy values than RFC, with low false positive errors. Hence, it could be combined with other methods in powerful hybrid approaches. Indeed, the hybrid approach ORFC+GC showed the best results for the calcaneus bone, being more robust than the graph cut with respect to the seed choice. OGC presents a drop of accuracy for higher radius values due to the known ‘shrinking problem’ of graph cut. ORFC presented the best results for the liver segmentation, taking advantage of its homogeneous interior. For the talus, ORFC showed a similar accuracy than ORFC+GC, but with a lower false positive rate and being less time-consuming.

We also repeated the experiments using two three-dimensional datasets. In the former case, a MRI-T1 dataset of the human brain was used to segment the cerebellum. The images were taken from 20 normal subjects from both genders, in the age range from 16 to 49 years. The images were acquired with a 2T Elscint scanner and at a voxel size of 0.98×0.98×1.00mm^{3}. The cerebellum is connected to the rest of the brain through the brain stem and through its top due to partial volume. The absence of a clear boundary between these structures poses a significant challenge for segmentation. For the second dataset, we considered a skull stripping task (Figure 12) (i.e., to eliminate background, bones, eyes, skin, and blood vessels) using ten 3 Tesla MRI-T1 images, that include the head and, at least, a small portion of the neck of male and female adults with normal brains.

Figures 13 and 14 show the experimental curves. The *R*
*F*
*C* and *O*
*R*
*F*
*C* methods performed poorly on these datasets due to the lack of a clear contrast between the structures. Nevertheless, the hybrid approach ORFC+GC showed the overall best results, demonstrating the importance of hybrid methods, and making clear that, even in these cases, *O*
*R*
*F*
*C* can help to improve the graph cut delineation and to reduce its running time.

## 8 Conclusions

In this paper, we introduced the ORFC technique and showed that it can effectively exploit the boundary polarity improving the results in relation to its predecessor RFC. We also presented a powerful hybrid approach, which outperforms the previous works [29,30]. As future work, we plan to investigate the theoretical relations between ORFC and OIFT, the usage of shape constraints in the ORFC (similar to what was done in [25]), and to combine the proposed methods with *fuzzy object models* [38-41] in order to get a fully automatic segmentation result.

## References

J Deng, N Ding, Y Jia, A Frome, K Murphy, S Bengio, Y Li, H Neven, H Adam, in

*Computer Vision - ECCV 2014. Lecture Notes in Computer Science*, 8689, ed. by D Fleet, T Pajdla, B Schiele, and T Tuytelaars. Large-scale object classification using label relation graphs (Springer,Zurich, Switzerland, 2014), pp. 48–64.KS Camilus, VK Govindan, A review on graph based segmentation. Intl. J. Image, Graphics Signal Process. 4(5), 1–13 (2012).

C Vehlow, T Reinhardt, D Weiskopf, Visualizing fuzzy overlapping communities in networks. Vis. Comput. Graphics, IEEE Trans. 19(12), 2486–2495 (2013). doi:10.1109/TVCG.2013.232.

O Chum, J Matas, Large-scale discovery of spatially related images. Pattern Anal. Mach. Intell. IEEE Trans. 32(2), 371–377 (2010). doi:10.1109/TPAMI.2009.166.

O Lézoray, L Grady,

*Image processing and analysis with graphs: theory and practice*(CRC Press, California, USA, 2012).J Cousty, G Bertrand, L Najman, M Couprie, Watershed cuts: thinnings, shortest path forests, and topological watersheds. IEEE Trans. Pattern Anal. Mach. Intell. 32, 925–939 (2010). doi:10.1109/TPAMI.2009.71.

RA Lotufo, AX Falcão, F Zampirolli, in

*Proceedings of the XV Brazilian Symposium on Computer Graphics and Image Processing*. IFT-watershed from gray-scale marker, (2002), pp. 146–152. doi:10.1109/SIBGRA.2002.1167137.L Grady, Random walks for image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 28(11), 1768–1783 (2006). doi:10.1109/TPAMI.2006.233.

KC Ciesielski, JK Udupa, PK Saha, Y Zhuge, Iterative relative fuzzy connectedness for multiple objects with multiple seeds. Comput. Vis. Image Underst. 107(3), 160–182 (2007).

R Audigier, RA Lotufo, in

*Proceedings of the XX Brazilian Symposium on Computer Graphics and Image Processing (SIBGRAPI)*. Seed-relative segmentation robustness of watershed and fuzzy connectedness approaches (IEEE CPSBelo Horizonte, MG, 2007), pp. 61–68.Y Boykov, G Funka-Lea, Graph cuts and efficient N-D image segmentation. Intl. J. Comp. Vis. 70(2), 109–131 (2006).

X Bai, G Sapiro, in

*Proc. of the IEEE Intl. Conf. on Image Processing*, 2. Distance cut: interactive segmentation and matting of images and videos (IEEE Computer Society,Washington D.C., 2007), pp. 249–252.AX Falcão, J Stolfi, RA Lotufo, The image foresting transform: theory, algorithms, and applications. IEEE Trans. Pattern Anal. Mach. Intell. 26(1), 19–29 (2004).

V Vezhnevets, V Konouchine, in

*Proc. Graphicon*. "GrowCut" - interactive multi-label N-D image segmentation by cellular automata (Moscow State University,Moscow, 2005), pp. 150–156.AK Sinop, L Grady, in

*Proc. of the 11th Intl. Conf. on Computer Vision*. A seeded image segmentation framework unifying graph cuts and random walker which yields a new algorithm (IEEE,Washington D.C., 2007), pp. 1–8.PAV Miranda, AX Falcão, in

*XXIV Conference on Graphics, Patterns and Images*. Elucidating the relations among seeded image segmentation methods and their possible extensions (Maceió,AL, 2011), pp. 289–296. doi:10.1109/SIBGRAPI.2011.13.KC Ciesielski, JK Udupa, AX Falcão, PAV Miranda, Fuzzy connectedness image segmentation in graph cut formulation: a linear-time algorithm and a comparative analysis. J. Math. Imaging Vis. 44(3), 375–398 (2012).

C Couprie, L Grady, L Najman, H Talbot, Power watersheds: a unifying graph-based optimization framework. IEEE Trans. Pattern Anal. Mach. Intell. 99(7), 1384–1399 (2010). doi:10.1109/TPAMI.2010.200.

PAV Miranda, AX Falcão, Links between image segmentation based on optimum-path forest and minimum cut in graph. J. Math. Imaging Vis. 35(2), 128–142 (2009).

KC Ciesielski, JK Udupa, AX Falcão, PAV Miranda, in

*Proc. of SPIE on Medical Imaging: Image Processing*, 8314. A unifying graph-cut image segmentation framework: algorithms it encompasses and equivalences among them, (2012). doi:10.1117/12.911810.Y Boykov, V Kolmogorov, An experimental comparison of min-cut/max-flow algorithms for energy minimization in vision. IEEE Trans. Pattern Anal. Mach. Intell. 26(9), 1124–1137 (2004).

PAV Miranda, LAC Mansilla, Oriented image foresting transform segmentation by seed competition. IEEE Trans. Image Process. 23(1), 389–398 (2014).

LAC Mansilla, PAV Miranda, in

*18th Intl. Conf. on Digital Signal Processing, Greece*. Image segmentation by oriented image foresting transform: handling ties and colored images (IEEE Computer Society,Washington D.C., 2013), pp. 1–6.D Singaraju, L Grady, R Vidal, in

*Intl. Conf. on Computer Vision and Pattern Recognition*. Interactive image segmentation via minimization of quadratic energies on directed graphs (IEEE,Washington D.C., 2008), pp. 1–8.LAC Mansilla, PAV Miranda, in

*15th International Conference on Computer Analysis of Images and Patterns (CAIP), vol. 8047. York, UK*. Image segmentation by oriented image foresting transform with geodesic star convexity (Springer,Berlin Heidelberg, 2013), pp. 572–579.PK Saha, JK Udupa, Relative fuzzy connectedness among multiple objects: theory, algorithms, and applications in image segmentation. Comp. Vision Image Underst. 82(1), 42–56 (2001).

PAV Miranda, AX Falcão, GCS Ruppert, FAM Cappabianco, in

*Proc. of the IEEE Intl. Symp. on Biomedical Imaging (ISBI)*. How to fix any 3D segmentation interactively via image foresting transform and its use in MRI brain segmentation (IEEE Computer Society,Washington D.C., 2011), pp. 2031–2035.PAV Miranda, AX Falcão, G Ruppert, in

*23rd SIBGRAPI: Conf. on Graphics, Patterns and Images*. How to complete any segmentation process interactively via image foresting transform (IEEE Computer Society,Washington D.C, 2010), pp. 309–316.KC Ciesielski, PAV Miranda, AX Falcão, JK Udupa, Joint graph cut and relative fuzzy connectedness image segmentation algorithm. Med. Image Anal. (MEDIA). 17(8), 1046–1057 (2013).

KC Ciesielski, PAV Miranda, JK Udupa, AX Falcã, in

*Proc. of the International Conference on Image Processing*. Image segmentation by combining the strengths of relative fuzzy connectedness and graph cut (IEEE,Orlando, Florida, USA, 2012), pp. 2005–2008.HHC Bejar, PAV Miranda, in

*XXVII SIBGRAPI - Conference on Graphics, Patterns and Images*. Oriented relative fuzzy connectedness: theory, algorithms, and applications in image segmentation (IEEE Computer Society,Rio de Janeiro, Brazil, 2014), pp. 304–311.JK Udupa, PK Saha, RA Lotufo, Relative fuzzy connectedness and object definition: theory, algorithms, and applications in image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 24, 1485–1500 (2002).

K Ciesielski, J Udupa, in

*Biomedical Image Processing. Biological and Medical Physics, Biomedical Engineering*, ed. by TM Deserno. Region-based segmentation: fuzzy connectedness, graph cut and related algorithms (Springer,Berlin, Germany, 2011), pp. 251–278.KC Ciesielski, JK Udupa, Affinity functions in fuzzy connectedness based image segmentation I: equivalence of affinities. Comput. Vision Image Underst. 114(1), 146–154 (2010).

KC Ciesielski, JK Udupa, Affinity functions in fuzzy connectedness based image segmentation II: defining and recognizing truly novel affinities. Comput. Vision Image Underst. 114(1), 155–166 (2010).

PAV Miranda, AX Falcão, JK Udupa, Synergistic arc-weight estimation for interactive image segmentation using graphs. Comput. Vision Image Underst. 114(1), 85–99 (2010).

AX Falcão, BS da Cunha, RA Lotufo, in

*Proceedings of SPIE on Medical Imaging*, 4322. Design of connected operators using the image foresting transform (SPIE,Bellingham, 2001), pp. 468–479.JK Udupa, D Odhner, L Zhao, Y Tong, MMS Matsumoto, KC Ciesielski, AX Falcao, P Vaideeswaran, V Ciesielski, B Saboury, S Mohammadianrasanani, S Sin, R Arens, DA Torigian, Body-wide hierarchical fuzzy modeling, recognition, and delineation of anatomy in medical images. Med. Image. Anal. 18(5), 752–771 (2014). doi:10.1016/j.media.2014.04.003.

JK Udupa, D Odhner, AX Falcã, KC Ciesielski, PAV Miranda, S Mishra, GJ Grevera, B Saboury, DA Torigian, in

*Proceedings of SPIE on Medical Imaging: Image-Guided Procedures, Robotic Interventions, and Modeling*, 8316. Automatic anatomy recognition via fuzzy object models (SPIE,San Diego, California, USA, 2012).PAV Miranda, AX Falcão, JK Udupa, in

*Proceedings of the IEEE International Symposium on Biomedical Imaging (ISBI)*. Cloud bank: a multiple clouds model and its use in MR brain image segmentation (IEEE,Boston, MA, 2009), pp. 506–509.PAV Miranda, AX Falcão, JK Udupa, in

*Proceedings of the IEEE International Symposium on Biomedical Imaging (ISBI)*.*CLOUDS*: a model for synergistic image segmentation (Paris, France, 2008), pp. 209–212.

## Acknowledgements

The authors thank CNPq (305381/2012-1, 486083/2013-6, FINEP 1266/13), FAPESP grant # 2011/50761-2, CNPq, CAPES, NAP eScience - PRP - USP, and Dr. J. K. Udupa (MIPG-UPENN) for the images.

## Author information

### Authors and Affiliations

### Corresponding author

## Additional information

### Competing interests

The authors declare that they have no competing interests.

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.

## About this article

### Cite this article

Ccacyahuillca Bejar, H.H., Miranda, P.A. Oriented relative fuzzy connectedness: theory, algorithms, and its applications in hybrid image segmentation methods.
*J Image Video Proc.* **2015**, 21 (2015). https://doi.org/10.1186/s13640-015-0067-4

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s13640-015-0067-4