and makes a lot of assumptions about the type of
wood, the lighting conditions and the image quality.
The photos of the stack of wood are taken in a con-
trolled environment which makes the proposed algo-
rithms useless in our scenario.
In computer vision there is a variety of approaches
to tackle the binary segmentation problem (Jaehne,
2005). However, when it comes to stable and fully
automatic segmentation of natural images, things are
getting complicated. Normalized Cuts (Shi and Ma-
lik, 2000) are used to find a reasonable partition of the
image. But these kinds of algorithms are optimized in
order to solve the grouping problem in vision.
Instead, we focused on a quite popular binary seg-
mentation framework from the fields of combinatorial
optimization. Hereby, a graph-cut results from solv-
ing for the maximum flow (Boykov and Jolly, 2001).
The corresponding minimum cut then describes the
resulting partition of the image. There are algorithms
that are optimized for grid-graphs (Boykov and Kol-
mogorov, 2004) and provide a feasible solution in a
few seconds, even for megapixel sized images.
There are different approaches to set the weights
of the graph. The weights between two adjacent ver-
tices are set often by using some metric like the eu-
clidian for instance. While finding a pixel to pixel
distance is straight forward, existing algorithms differ
in setting the weights for the remaining edges to the
source and the sink node. A good and practical solu-
tion for gray scaled images is the usage of a histogram
which describes the two necessary distributions for
binary segmentation (Boykov and Jolly, 2001). In the
case of RGB images, it is more challenging to find
a model for the two distributions. In (C. Rothar and
Blake, 2004) a Gaussian Mixture Model (GMM) is
used for description. However, the method deals with
interactive segmentation. It is derived from (Orchard
and Bouman, 1991).
We implemented this GMM method and found it
unstable. The method is quite prone to outliers. In
interactive segmentation, this is not so important be-
cause the model can be changed quickly. But this does
not meet our requirements. Instead, in our compari-
son we replaced the method for estimating the GMMs
by the Expectation Maximization algorithm.
3 PROBLEM DISCUSSION
The volume especially the solid cubic meter of a stack
of wood is simple computable via a multiplication of
the area of the log cut surfaces with the depth. The
depth per stack of wood is known, but not the wood
surfaces. To determine the wood area from images,
the stack of wood must be taken from a frontal posi-
tion, whereby the log cut surfaces must be visible (see
figure 2).
To obtain the area of wood the image must first
transform into a real coordinate system, so that every
pixel has the same area in real square meter. Secondly,
a stack of wood often doesn’t fit into a single image.
Due to this problem more images must be taken from
one stack of wood and be stitched together. Thirdly,
a segmentation is required to separate the wood and
non-wood pixel. How to transform the images and
stitch them together is beyond the scope of this paper.
Therefore, we here only address the third problem, the
segmentation.
The objective is to separate automatically and
soundly the log cut surfaces from different images.
Log cut surfaces of a stack of wood in praxis vary
in shape and color. The shape of an log cut surface
seems to be a circle or an ellipse, but that is not ever
given in praxis (see figure 1). Therefore a shape find-
ing technique, e.g. ellipse fitting, cannot be applied.
Furthermore the color from one stack of wood to an-
other is different and dependent on the wood type,
whereby no general color matching is appropriate.
Figure 1: Logs with different shape and color.
Logs have a certain self-similarity, but in a dif-
ferent degree. Hence the usage of simple region
based methods, e.g. watershed or split and merge,
lead to the well known problem of under- or over-
segmentation. In summary, there is no exact color
or shape for all logs usable, but for one single stack
of wood the color is mostly similar and the gradients
between logs and non logs are often high.
For this reason we extract color information from
the image first and use this to segment the image. To
use both characteristics of local gradient and global
color a graph-cut approach is used.
4 OUR APPROACH
For our approach we require some general restrictions
on the image acquisition to have some context infor-
mation. First, the image needs to be taken from a
SETTING GRAPH CUT WEIGHTS FOR AUTOMATIC FOREGROUND EXTRACTION INWOOD LOG IMAGES
61