Keywords

1 Introduction

Image segmentation is one of the most fundamental and challenging problems in image processing and computer vision. In many scenarios, the high-level, application-domain specific knowledge of the user is often required in the segmentation process because of the presence of heterogeneous backgrounds, objects with ill-defined borders, field inhomogeneity, noise, artifacts, partial volume effects, and their interplay [19]. It may be thought of as consisting of two related processes – object recognition and delineation [10]. Recognition is the task of determining an object’s approximate whereabouts in the image. Delineation completes segmentation by defining the exact spatial extent of that object. In this work, we are interested in solving the delineation problem by fast methods to efficiently deal with large amounts of data, but which must also be versatile enough to support the inclusion of high-level constraints from prior object knowledge.

The segmentation problem can be interpreted as a graph partition problem subject to hard constraints, such as seed pixels selected in the image domain for object recognition, by modelling neighborhood relations of picture elements from digital images. Examples of seed-based methods are watershed [8], random walks [12], fuzzy connectedness [5], graph cuts (GC) [2], grow cut [18], minimum barrier distance [7], and image foresting transform (IFT) [6, 9]. Some methods, including the min-cut/max-flow algorithm, can provide global optimal solutions according to a graph-cut measure in graphs and can be described in a unified manner according to a common framework, which we refer to as Generalized GC (GGC) [4].

Oriented Image Foresting Transform (OIFT) [24] and Oriented Relative Fuzzy Connectedness (ORFC) [1] are extensions of some GGC methods for directed weighted graphs, which have lower computational complexity compared to the min-cut/max-flow algorithm [2]. OIFT is a flexible method, which has been extended to support the processing of global object properties, such as connectedness [20, 21], shape constraints [23, 25], boundary polarity [1, 22], and hierarchical constraints [16]. These high-level priors are potentially useful for object segmentation, allowing the customization of the segmentation to a given target object. Shape constraints can be used to eliminate undesirable intricate forms, improving the segmentation of objects with more regular contour. Some shape constraints demand more sophisticated algorithms, such as the Boundary Band constraint (\({{\,\mathrm{BB}\,}}\)) [25]. The OIFT with the BB constraint allows the segmentation to follow a pre-established template of shapes, with variances within a range of permitted deformations around an arbitrary scale, while other approaches handle scale inefficiently based on brute force, by computing the graph cut for each level of a gaussian pyramid [11].

In this work, we propose a novel shape constraint, named Local Band constraint (\({{\,\mathrm{LB}\,}}\)), to be used for object segmentation in the Generalized GC framework and which, in its limit case, is strongly related to the Boundary Band constraint [25]. The \({{\,\mathrm{LB}\,}}\) constraint demonstrates competitive results with higher accuracy when compared to \({{\,\mathrm{BB}\,}}\), Hedgehog [14, 15], and Geodesic Star Convexity [13] in various scenarios. It can also be easily combined with other high-level priors already supported by OIFT, considerably advancing the targeted segmentation [17].

The next section gives the required background on image graphs and GGC. The proposed Local Band constraint is presented in Sect. 3. In Sect. 4, we experimentally evaluate \({{\,\mathrm{LB}\,}}\), comparing it to previous graph-based works on shape constraints. Our conclusions are stated in Sect. 5.

2 Background

An image can be interpreted as a directed graph (digraph) \(G=(\mathcal{I},\mathcal{A})\) whose nodes/vertices are the image pixels in its image domain \(\mathcal{I}\subset \mathbb {Z}^n\) and whose arcs/edges, elements of \(\mathcal{A}\), are the ordered pixel pairs (st) of vertices that are adjacent, that is, spatially close (e.g., 4-neighborhood, or 8-neighborhood, in the case of 2D images). We write \(t\in \mathcal{A}(s)\) or \((s,t)\in \mathcal{A}\) to indicate that t is adjacent to s. We will usually assume also that our image graph G is edge-weighted, that is, that each arc \((s,t)\in \mathcal{A}\) has a fixed weight \(w(s,t)\in [-\infty ,\infty ]\) (often \(w(s,t) = \Vert \mathcal{I}(t)-\mathcal{I}(s)\Vert \) for an image with values given by \(\mathcal{I}(t)\)). An edge weighted digraph will be denoted as \(G=(\mathcal{I},\mathcal{A},w)\). A digraph G is symmetric if, for all \((s,t) \in \mathcal{A}\), the pair (ts) is also an arc of G. Note that in symmetric graphs we can have \(w(s,t) \ne w(t,s)\). In this work, all considered graphs are symmetric and connected.

Image segmentation can be formulated as a graph partition problem subject to hard constraints. In the case of binary segmentation (object/background), we consider two non-empty disjoint seed sets \(\mathcal{S}_{1}\) and \(\mathcal{S}_{0}\) containing pixels selected inside the object \(\mathcal{O}\) and in its exterior, respectively. A label, \(L(t)=1\) for all \(t\in \mathcal{S}_{1}\) and \(L(t)=0\) for all \(t\in \mathcal{S}_{0}\), is propagated to all unlabeled pixels during the execution of seed-based segmentation algorithms, see e.g. [24]. For a label map \(L:\mathcal{I}\rightarrow \{0,1\}\) an object identified with it is defined as \(\mathcal{O}:=\{t\in \mathcal{I}:L(t)=1\}\).

figure a

In the case of directed weighted graphs, there are two important classes of energy formulations within the Generalized GC framework: the Max-MinFootnote 1 and Min-Sum optimizers [4]. OIFT and ORFC algorithms are Max-Min optimizers while the min-cut/max-flow algorithm is a Min-Sum optimizer. The resulting segmentation by OIFT gives a global optimum solution by maximizing the following graph-cut measure

$$ \begin{aligned} \varepsilon _{\min }(L) = \min \{ w(s,t):(s,t)\in \mathcal{A} \ \& \ L(s) > L(t)\} \end{aligned}$$
(1)

subject to the seed constraints [24].

The segmentation L by OIFT can be computed by Algorithm 1, which comes from [22]. This algorithm, which can also be adapted for multi-object segmentation by computing a related variant in a hierarchical layered digraph [16], will be a part of our new algorithm. Note that in line 11 of Algorithm 1, the weight w(ts) of the anti-parallel arc (ts) is used (rather than that of chosen \((s,t)\in \mathcal{A}\)). That is why a symmetric digraph is required.

For the results presented in this work, the most important property of the OIFT algorithm is the following result, see [24, Theorem 3]:

Proposition 1

[Miranda, Mansilla 2014]. Let \(G=(\mathcal{I},\mathcal{A},w)\) be a symmetric edge weighted image digraph. Let L be a segmentation returned by Algorithm 1 applied to G and non-empty disjoint seed sets \(\mathcal{S}_{1}\) and \(\mathcal{S}_{0}\). Then L satisfies the seed constraints and maximizes the energy \(\varepsilon _{\min }\), given by (1), among all segmentations satisfying these constraints.

3 The Local Band Constraint

Let \(C:\mathcal{I} \rightarrow [0,\infty )\) be a fixed vertex cost function associated with an image digraph \(G=(\mathcal{I},\mathcal{A})\). Usually C(t) is defined as a minimum of all possible path cost functions for the paths from \(\mathcal{S}_{1}\) to t. The path cost can be its geodesic length, as used in Geodesic Star Convexity, but other path costs are also useful. It can also be based on templates of shapes discussed in [3], which will be considered for evaluation in Sect. 4.

To relate Local Band constraint to Boundary Band constraint introduced in [25], we first introduce the following notion of Local Boundary Band constraint, \({{\,\mathrm{LBB}\,}}\). In this definition the symbol \(\Vert \cdot \Vert \) denotes the standard Euclidean \(L_2\) norm on \(\mathcal{I}\subset \mathbb {Z}^2\). The boundary of an object \(\mathcal{O}\) is defined as

$$ {{\,\mathrm{bd}\,}}(\mathcal{O}) = \left\{ t \in \mathcal{O} :\exists s \in \mathcal{A}(t) \text{ such } \text{ that } s \notin \mathcal{O} \right\} . $$

Definition 1

(Local Boundary Band constraint (\({{\,\mathrm{LBB}\,}}\))). For \(\varDelta ,R>0\) and a cost map \(C:\mathcal{I}\rightarrow [0,\infty )\), a pixel \(t \in \mathcal{O}\) is \({{\,\mathrm{LBB}\,}}^R_\varDelta \) (satisfies Local Boundary Band Constraint with band size \(\varDelta \) and parameter R) provided \(C(t)<C(s) + \varDelta \) for all \(s\in {{\,\mathrm{bd}\,}}(\mathcal{O})\) such that . An object \(\mathcal{O}\) is \({{{\,\mathrm{LBB}\,}}}^R_\varDelta \) provided every \(t \in \mathcal{O}\) is \({{\,\mathrm{LBB}\,}}^R_\varDelta \).

Definition 2

(Boundary Band constraint (\({{\,\mathrm{BB}\,}}\))). For \(\varDelta >0\), an object \(\mathcal{O}\) is \({{{\,\mathrm{BB}\,}}}_\varDelta \) (satisfies Boundary Band constraint with band size \(\varDelta \)) provided it is \({{\,\mathrm{LBB}\,}}^\infty _\varDelta \), that is, when \(C(t)<C(s) + \varDelta \) for all \(t \in \mathcal{O}\) and \(s\in {{\,\mathrm{bd}\,}}(\mathcal{O})\). As a consequence, \({{\,\mathrm{bd}\,}}(\mathcal{O})\) is contained in the band \(\{s\in \mathcal{I}:C(s)\in (m-\varDelta ,m]\}\), where \(m=\max \{C(t):t\in \mathcal{O}\}\). In particular, \(|C(s)-C(t)|<\varDelta \) for all \(s,t\in {{\,\mathrm{bd}\,}}(\mathcal{O})\). Consequently, this regularizes the shape of \({{\,\mathrm{bd}\,}}(\mathcal{O})\), see [25].

The idea of \({{\,\mathrm{BB}\,}}\) is to establish a maximum possible variation of the cost C between the boundary points \({{\,\mathrm{bd}\,}}(\mathcal{O})\) of the object \(\mathcal{O}\) to be segmented. This is expected to prevent the generated segmentation to be irregular in relation to the C-level sets [25]. During the OIFT computation subject to \({{\,\mathrm{BB}\,}}\), the band changes its reference level set, allowing a better adaptation to the image content, while its width is kept fixed (Fig. 1). Note that this bears some resemblance to narrow band level set [26] and to the regional context of a level line used in [27].

Fig. 1.
figure 1

Brain segmentation example in MRI exam. (a–b) Segmentation results by OIFT without and with the \({{\,\mathrm{BB}\,}}\) constraint, respectively. (c–d) The \({{\,\mathrm{BB}\,}}\) fixed size band evolves from the seeds, adapting to the image contents. Note that the segmentation boundary achieved in (b) resides within the band area in (d).

In \({{\,\mathrm{BB}\,}}\), however, local changes in a part of the object can generate constraint violations in any other part of its boundary, usually resulting in greater sensitivity to the initialization of the cost map C and to the positioning of internal seeds, while in \({{\,\mathrm{LBB}\,}}\) its consistency checks are limited locally, leading to a more flexible solution. Clearly, every \({{\,\mathrm{BB}\,}}_\varDelta \) object is \({{\,\mathrm{LBB}\,}}^R_\varDelta \), but the converse is not true. However, for every C and \(\varDelta \), there exists an \(R\in (0,\infty )\) such that the property \({{\,\mathrm{LBB}\,}}^R_\varDelta \) implies \({{\,\mathrm{BB}\,}}_\varDelta \) (this certainly holds for any \(R\ge \max \{\Vert s-t\Vert :s,t\in {\mathcal I}\}\)). Thus, \({{\,\mathrm{BB}\,}}_\varDelta \) can be considered as a limit, as \(R\rightarrow \infty \), of \({{\,\mathrm{LBB}\,}}^R_\varDelta \).

In order to facilitate the implementation, we consider an approximate alternative definition, named the Local Band constraint (\({{\,\mathrm{LB}\,}}\)), in order to avoid the continuous analysis of the dynamic set of boundary pixels inside the disks of radius R at runtime, but keeping the main idea of locally restricting the band effects. This effort resulted in the following similar definition.

Definition 3

(Local Band constraint (\({{\,\mathrm{LB}\,}}\))). For \(\varDelta ,R>0\) and a cost map \(C:\mathcal{I}\rightarrow [0,\infty )\), a pixel \(t \in \mathcal{O}\) is \({{\,\mathrm{LB}\,}}^R_\varDelta \) (satisfies Local Band constraint with band size \(\varDelta \) and parameter R) provided \(C(t)<C(s) + \varDelta \) for all \(s\in \mathcal{I} \setminus \mathcal{O}\) such that . An object \(\mathcal{O}\) is \({{{\,\mathrm{LB}\,}}}^R_\varDelta \) provided every \(t \in \mathcal{O}\) is \({{\,\mathrm{LB}\,}}^R_\varDelta \).

In other words, if \(\mathcal{O}\) is \({{\,\mathrm{LB}\,}}^R_\varDelta \), then for any pair of pixels s and t such that and \(C(t) - C(s) \ge \varDelta \), we have that \(t \in \mathcal{O}\) implies \(s \in \mathcal{O}\). Note that neither of the statements “\(\mathcal{O}\) is \({{\,\mathrm{LB}\,}}^R_\varDelta \)” and “\(\mathcal{O}\) is \({{\,\mathrm{LBB}\,}}^R_\varDelta \)” implies the other. Nevertheless, they are closely related (Fig. 2), as shown by the following result.

Proposition 2

Let and . If \(\varDelta ,R>0\) and \(\mathcal{O}\) is \({{\,\mathrm{LB}\,}}_\varDelta ^{R+r}\), then \(\mathcal{O}\) is \({{\,\mathrm{LBB}\,}}_{\varDelta +\delta }^{R}\).

Proof

Choose a \(t\in \mathcal{O}\). Then \(C(t)<C(s) + \varDelta \) for all \(s\in \mathcal{I} \setminus \mathcal{O}\) such that . We need to show that t is \({{\,\mathrm{LBB}\,}}_{\varDelta +\delta }^{R}\), that is, that \(C(t)<C(u) + \varDelta +\delta \) for all \(u\in {{\,\mathrm{bd}\,}}(\mathcal{O})\) such that . So, take such u. Then, there is an \(s\in \mathcal{I} \setminus \mathcal{O}\) with \((u,s)\in {\mathcal A}\). Notice that . Using this and the definition of \(\delta \), we get \(C(t)<C(s) + \varDelta \le C(u)+ \varDelta +|C(s) -C(u)|\le C(u)+ \varDelta +\delta \), as needed.

Since usually numbers \(\delta \) and r are small, so should be the difference between the objects with properties \({{\,\mathrm{LB}\,}}_\varDelta ^{R}\), \({{\,\mathrm{LB}\,}}_\varDelta ^{R+r}\), \({{\,\mathrm{LBB}\,}}_{\varDelta +\delta }^{R}\), or \({{\,\mathrm{LBB}\,}}_{\varDelta }^{R}\) and, for large R, each approximates \({{\,\mathrm{BB}\,}}_\varDelta \).

Fig. 2.
figure 2

Example of Proposition 2, where “t is \({{\,\mathrm{LB}\,}}_\varDelta ^{R+r}\)” and “t is \({{\,\mathrm{LBB}\,}}_{\varDelta +\delta }^{R}\)” for \(R=2.5\), \(r=1.0\), \(\varDelta =1\) and \(\delta =1\). (a) \(\mathcal{O}\), (b) \({{\,\mathrm{bd}\,}}(\mathcal{O})\), and (c) the disks of radii R and \(R+r\). (Color figure online)

The \({{\,\mathrm{LB}\,}}\) constraint can be implemented, as proposed in Algorithm 2 for OIFT, by considering a modified graph \(G'\) with the \({{\,\mathrm{LB}\,}}\) constraint embedded on its arcs. In general, the worst cost should be \(\infty \) for Min-Sum optimizers and \(-\infty \) for Max-Min optimizers. In order to maintain a symmetric graph, we also create anti-parallel arcs with the best cutting cost (zero for Min-Sum and \(\infty \) for Max-Min optimizers) if they do not exist (line 5 in Algorithm 2). Note that in \(G'\) the set of displacement vectors \(D(s) = \{t-s : t \in \mathcal{A}'(s) \}\) varies for different positions of s, leading therefore to a translation-variant adjacency relation.

figure b

Theorem 3

Let \(G=(\mathcal{I},\mathcal{A},w)\) be a symmetric edge weighted image digraph with \(w:\mathcal{A}\rightarrow \mathbb {R}\). Let L be a segmentation returned by Algorithm 2 applied to G, non-empty disjoint seed sets \(\mathcal{S}_{1}\) and \(\mathcal{S}_{0}\), cost map \(C:\mathcal{I} \rightarrow [0,\infty )\), and parameters \(R > 0\) and \(\varDelta > 0\). Assume that \(\mathcal{S}_{1}\) and \(\mathcal{S}_{0}\) are \({{\,\mathrm{LB}\,}}^{R}_{\varDelta }\)-consistent, that is, that

(\(\star \)):

there exists a labeling satisfying seeds and \({{\,\mathrm{LB}\,}}^{R}_{\varDelta }\) constraints.

Then L satisfies seeds and \({{\,\mathrm{LB}\,}}^{R}_{\varDelta }\) constraints and maximizes the energy \(\varepsilon _{\min }\), given by (1) w.r.t. G, among all segmentations satisfying these constraints.

Proof

In this proof \(\varepsilon ^G_{\min }\) and \(\varepsilon ^{G'}_{\min }\) denote the energy \(\varepsilon _{\min }\) with respect to G and \(G'\), respectively. Let and \(\mathcal{M}:=\{(t,s):(s,t)\in \mathcal{L}\}\setminus {\mathcal A}\). It is easy to see that after the execution of lines 1-5 we have \(\mathcal{A}'={\mathcal A}\cup {\mathcal L}\cup {\mathcal M}\) and

$$ w'(s,t)= {\left\{ \begin{array}{ll} -\infty &{} \text{ for } (s,t)\in {\mathcal L}, \\ \infty &{} \text{ for } (s,t)\in {\mathcal M}, \\ w(s,t) &{} \text{ otherwise, } \text{ that } \text{ is } \text{ for } (s,t)\in {\mathcal A}\setminus {\mathcal L}. \end{array}\right. } $$

Also, by Proposition 1, after the execution of line 6 the labeling L satisfies the seed constraints and maximizes the energy \(\varepsilon ^{G'}_{\min }\) among all segmentations satisfying seeds constraints. We need to show that L satisfies also \({{\,\mathrm{LB}\,}}^{R}_{\varDelta }\) constraints an that it maximizes \(\varepsilon ^G_{\min }\) among all segmentations satisfying these constraints.

To see this, let \(L':{\mathcal I}\rightarrow \{0,1\}\) be an arbitrary labeling satisfying seeds and \({{\,\mathrm{LB}\,}}^{R}_{\varDelta }\) constraints. It exists by (\(\star \)). Then, by the definition of \({{\,\mathrm{LB}\,}}^{R}_{\varDelta }\) constraints, the set \(T':=\{(p,q)\in {\mathcal A}':L'(p)>L'(q)\}\) is disjoint with \({\mathcal L}\). In particular,

$$ \varepsilon ^{G'}_{\min }(L)\ge \varepsilon ^{G'}_{\min }(L')=\min \{w'(s,t):(s,t)\in \mathcal{A}' \ \& \ L'(s)> L'(t)\}>-\infty . $$

Hence

$$ \varepsilon ^{G'}_{\min }(L)=\min \{ w'(s,t):(s,t)\in \mathcal{A}' \ \& \ L(s)> L(t)\}>-\infty , $$

so that the set \(T:=\{(p,q)\in {\mathcal A}':L(p)>L(q)\}\) must be also disjoint with \({\mathcal L}\). This means that L satisfies \({{\,\mathrm{LB}\,}}^{R}_{\varDelta }\) constraints. To finish the proof we need to show that \(\varepsilon ^{G}_{\min }(L)\ge \varepsilon ^{G}_{\min }(L')\). For this notice first that

$$\begin{aligned} \varepsilon ^{G'}_{\min }(L')=\varepsilon ^{G}_{\min }(L'). \end{aligned}$$
(2)

Indeed, \(T'\cup T\) is disjoint with \({\mathcal L}\), so \( (s,t)\in \mathcal{A}' \ \& \ L'(s) > L'(t)\) implies that \((s,t)\in ({\mathcal A}\setminus {\mathcal L})\cup {\mathcal M}\). Thus, since \(w'=w\) on \({\mathcal A}\setminus {\mathcal L}\) and \(w'=\infty \) on \({\mathcal M}\),

$$ \begin{aligned} {\varepsilon ^{G'}_{\min }(L')}= & {} \min \{w'(s,t):(s,t)\in \mathcal{A}' \ \& \ L'(s)> L'(t)\}\\= & {} {\min \left( \{w'(s,t):(s,t)\in {\mathcal A}\setminus {\mathcal L} \ \& \ L'(s)> L'(t)\}\cup \{\infty \}\right) }\\= & {} {\min \left( \{w(s,t):(s,t)\in {\mathcal A} \ \& \ L'(s) > L'(t)\}\cup \{\infty \}\right) }=\varepsilon ^{G}_{\min }(L'), \end{aligned}$$

as needed. Finally, using (2) for L and \(L'\), we obtain

$$ \varepsilon ^{G}_{\min }(L)= \varepsilon ^{G'}_{\min }(L)\ge \varepsilon ^{G'}_{\min }(L')=\varepsilon ^{G}_{\min }(L'), $$

finishing the proof.

4 Experimental Results

In this section we compare \({{\,\mathrm{LB}\,}}\) with shape constraints commonly employed in graph-based segmentation: Geodesic Star Convexity [13], Boundary Band [25], and Hedgehog Shape Prior [14, 15]. We opted to compare them using Max-Min optimizers, because \({{\,\mathrm{BB}\,}}\) is not yet supported by Min-Sum optimizers [25].

From the IFT [9] perspective, when the cost map C is the geodesic length from \(\mathcal{S}_{1}\) in \(G=(\mathcal{I},\mathcal{A})\), the previous constraints are based on different attributes of a previously computed minimal forest in G rooted at \(\mathcal{S}_{1}\): Geodesic Star Convexity uses the predecessor map [23], \({{\,\mathrm{BB}\,}}\) and \({{\,\mathrm{LB}\,}}\) constraints exploit the cost map directly, and Hedgehog uses the gradient of the cost map as vector field.

Fig. 3.
figure 3

Pool ball OIFT segmentation with a circle template in a \(600 \times 338\) image.

Fig. 4.
figure 4

Wall tile segmentation by OIFT with a square template in a \(576 \times 881\) image.

Fig. 5.
figure 5

The accuracy curves for different horizontal displacements of the internal seeds.

Fig. 6.
figure 6

Archaeological fragment segmentation.

Fig. 7.
figure 7

(a) The mean accuracy values to segment the archaeological fragments for different image resolutions. (b) Zoomed results (accuracy \(\ge 95\)%).

Fig. 8.
figure 8

The mean accuracy curves to segment the liver for seed sets obtained by erosion.

Figure 3 shows the segmentation results by OIFT using different methods and a circle template, as reference cost map, centered on the center of mass of the internal seeds. The \({{\,\mathrm{BB}\,}}\) constraint fails to give good results compared to Local Band and Hedgehog, due to its greater sensitivity to the template positioning. Figure 4 shows some results of a tile segmentation using a square template. In order to measure the sensitivity of the most promising methods for different seed positioning, in Fig. 5 we show the accuracy curves using internal seeds in a circular brush of radius 3 pixels with horizontal displacements relative to the object’s center. Note that, in both cases, \({{\,\mathrm{LB}\,}}\) (\(R=3.5\) and \(\varDelta =2\)) has the most accurate and slightly more stable results, giving almost perfect results for 41.4% and 10.3% of the maximum possible horizontal shift in the pool ball (radius 84 pixels) and wall tile (radius 145 pixels), respectively.

We also tested their robustness in relation to different image resolutions by quantitative experiments, to segment archaeological fragments in seven different resolutions with the geodesic cost. In order to make the experiment more challenging, the simple arc weight \(w(s,t) = G(s)+G(t)\) was used, disregarding any prior color information, where G(t) denotes the magnitude of Sobel gradient, such that we have several false boundaries (Fig. 6). Figure 7 shows the mean values of the Dice coefficient for segmenting ten fragments for each image resolution, totalizing 70 executions for each method. The overall best results were obtained by \({{\,\mathrm{LB}\,}}\) using \(R=3.5\) and \(\varDelta =2\). Hedgehog for different \(\theta \) values and the same radius presented unstable results (Fig. 6d). Further increasing its radius is not recommended, since it drastically increases the computational cost.

Finally, we conducted experiments with the geodesic cost to segment the liver in medical images of 40 slices of thoracic CT studies of size \(512 \times 512\), using regular weights \(w(s,t) = \Vert \mathcal{I}(t)-\mathcal{I}(s)\Vert \) and seed sets progressively obtained by eroding the ground truth and its background with twice the radius size. Although this scenario is apparently advantageous for the \({{\,\mathrm{BB}\,}}\) constraint, in view of the well-distributed and centralized seeds, \({{\,\mathrm{LB}\,}}\) (\(R=3.5\) and \(\varDelta =2\)) demonstrated good results with the highest accuracy for a large part of the curve (Fig. 8a). We repeated the experiments, but now with the internal seeds shifted by 5 pixels to the left (25% of the maximum possible displacement in the central part of the curves) whenever possible. In this new scenario, the results clearly show that \({{\,\mathrm{LB}\,}}\) is more robust than \({{\,\mathrm{BB}\,}}\) in relation to seed positioning (Fig. 8b).

5 Conclusion

We have proposed the Local Band shape constraint, for the Generalized GC framework, which in its limit case (i.e., \(R\rightarrow \infty \)) is strongly related to Boundary Band constraint and is less sensitive to the seed/template positioning. To the best of our knowledge, we are also the first to report OIFT with the Hedgehog shape prior. As future work, we intend to test \({{\,\mathrm{LB}\,}}\) in 3D medical applications.