where the deviation function depends on the devia-
tion of the assigned color from the given intensity, r
i
and the separation is a function of the difference in as-
signed intensities between adjacent pixels (x
i
and x
j
).
D and S are constant integers multiplying the devia-
tion and separation terms respectively. If S = 0 then
the output is the same as the input, if the colors of
the input are in X, otherwise each pixel is assigned a
”nearest” color label in X. If D = 0 then the output is
a single color label assigned to all nodes. The values
of S and D, if positive, are not important. Only the
ratio of
S
D
is important in determining the degree of
color uniformity in the image. The larger this ratio,
the greater the color uniformity.
The complexity of the separation-deviation prob-
lem depends on the form of the penalty functions. A
full classification of the problem’s complexity is given
in (Hochbaum, 2001) showing that for convex penalty
functions the problem is polynomially solvable, and
for non-convex the problem is NP-hard. The cases
when the deviation penalty functions are convex and
the separation penalty functionsare linear, for positive
and negative deviations (e.g. F
ij
(x
i
− x
j
) = |x
i
− x
j
|),
was shown by Hochbaum (Hochbaum, 2001) to be
solvable using an algorithm which is the fastest pos-
sible. For the type of problems we are interested in
the choice of linear separation functions gives better
results than convex quadratic ones.
3 THE INTERACTIVE TOOL
AND SOME RESULTS
The empirical implementation of the separation-
deviation algorithm is using a parametric minimum
s, t-cut algorithm code. Our code is based on the
pseudoflow algorithm of (Hochbaum, 2008) for max-
imum flow and minimum cut. The code is accessi-
ble for download at (Chandran and Hochbaum, 2007).
Figure 1 shows the synthetic noisy image, which was
used as the input in this illustration and its corre-
sponding true brain image, (Collins et al., 1998).
Figure 1: Brain image, Noisy and True.
The current algorithm’s interface tool supports the
following interactive functions:
Segment Image with a Fixed Number of Automat-
ically Selected Colors. For a selected number of
colors the tool uses a k-means algorithm to select the
colors. The number of colors is not necessarily equal
to the number of segments as each color set is not re-
stricted to be a connected component.
Segment for a Specific Selected Color Set X. The
user can add or remove colors from an existing color
set by clicking on any pixel in the image, or manually
insert the color code. As derived from the theory (out-
lined in an expanded version of this paper), the output
image can be generated by reading the existing output
and without additional computation.
Uniform Increase/Decrease in Deviation and Sep-
aration Costs. The tools allows to modify the ratio
S
D
. The effect of modifying this ratio is illustrated in
Figure 2 for the brain images, shown in Figure 1. In
that image here are four small lesions. We then apply
the separation-deviation algorithm with D = 2 and for
increasing values of S. The lesions show very clearly
in the high separation images.
S = 30
S = 40
S = 50
S = 60
S = 70
S = 80
Figure 2: The output for increasing values of S when ap-
plied to noisy brain image.
Color Restricted Change in Deviation. When the
user suspects that a certain color area may indicate an
object of interest, it is possible to increase the devi-
ation functions associated with this color only. So
for selected color g the deviation function G
i
(x
i
, g)
is increased by the selected factor for all pixels with
input color g. This guarantees that any pixel with
input color equal to g is more likely to show in
the segmented output, even though it is small and
has unusual boundaries that otherwise would have
been “cleaned” by the separation penalty dominance.
When selecting, for example, in the brain image in
Figure 1, the color orange, it appears as the color of 3
out of the 4 lesions, as can be seen in Figure 3. When
the deviation for that color is increased the lesions
BIOSIGNALS 2009 - International Conference on Bio-inspired Systems and Signal Processing
460