2006) use sky detection in the context of image qual-
ity enhancement in video data. Their system gen-
erates a sky probability map based on texture, color
values, gradients, and vertical position in the image.
They achieve very good results, however, they only
detect blue sky and therefore their system gives low
sky probability in clouds.
However, in many parts of the world clouded sky
is very common. Thus, systems which restrict them-
selves to blue sky detection are restricted in practica-
bility. Our new system detects the total sky under all
weather conditions.
First ideas of the presented approach – not includ-
ing the following major improvements based on the
analysis of segment’s shape and gradients – have been
presented in the German workshop “Farbworkshop
2008” (Schmitt and Priese, 2008).
3 CHARACTERISTICS OF SKY
In systems for the detection of a cloudless sky one
may assume that the sky is free of large gradients but
shows a continuous brightness gradient. As we regard
clouds as part of the sky we can not make such an
assumption. Our sky detector is thus based on differ-
ent assumptions and observations of characteristics of
the sky in color images in urban regions. We assume
that the images to be analyzed have been acquired ho-
rizontally so that the sky is at the top of the image.
Where this assumption does not apply one may em-
ploy algorithms for horizon estimation as introduced
in (Ettinger et al., 2002) or (Fefilatyev et al., 2006).
Beside the position in the image, the color is the
second characteristic property of the sky. The color
can range from a pure white over different kinds of
gray inside clouds to shades of blue of different satu-
ration and brightness in cloudless regions. We further
assume, that all segments belonging to the sky have a
vertical connection to the upper border of the image,
either directly or through other segments recognized
as sky.
If one chooses, e.g., split-and-merge (Horowitz
and Pavlidis, 1974) (SaM) as a segmentation tech-
nique and the sky disintegrates into several seg-
ments the borders between those segments show large
straight lines. Those reflect the underlying quad-tree
structure of the SaM algorithm. This will not hap-
pen with the CSC segmentation technique. The bor-
ders of two segments of the sky almost always show
an irregular contour without straight lines. However,
the border between sky and buildings is usually build
from straight lines. This leads to further classification
criteria.
4 THE ALGORITHM
4.1 Basic Concepts
Our algorithm is directly motivated by the observa-
tions of the previous paragraph.
In a first step we smooth the image and segment it
into spatially connected, color homogeneous regions.
In the next step we start at the top border of the image
and search for segments whose mean color is suitable
for sky.
However, an analysis of mean color and position
is insufficient. Such a straight forward method also
classifies white, gray, and blue objects outside the sky
- but immediately below the horizon - as sky. To re-
duce the number of those false-positive classifications
we have to add another step where the shape of possi-
ble sky segments is analyzed.
4.2 Pre-processing and Segmentation
The input image is first smoothed with one iteration of
a 3×3 Kuwahara-filter(M. Kuwahara, K. Hachimura,
S. Eiho, and M. Kinoshita, 1976). This non-linear
filter sharpens borders and simultaneously smooths
within homogeneous regions. The filtered image is
segmented into spatially connected, color homoge-
neous regions with the CSC.
The CSC is a region growing segmentation
method steered by a hierarchy of overlapping is-
lands. If two overlapping partial segments are simi-
lar enough they are merged into a new segment. Else
the common sub-region is split between them. As the
decision whether to split or to merge two regions is
not only based on a common border but a common
sub-region, the results are more stable than in con-
ventional region growing methods. The structure of
the island hierarchy makes the CSC inherently paral-
lel. Also, there is no need for spreading seed points
in the image whose position influences the outcome
of the segmentation in conventional region growing
methods.
It is important to choose the parameters of the
CSC such that an over-segmentation (areas belonging
together are split into several segments) is more likely
than an under-segmentation (areas not belonging to-
gether are merged into one segment) as an additional
classification of the found segments has to been done
anyway.
The CSC segmentation can be applied either in
HSV color space based on color similarity tables
(Rehrmann, 1994) or in L*a*b* color space where
similarity between two shades of color is calculated
using the Euclidean distance. For the experiments in
VISAPP 2009 - International Conference on Computer Vision Theory and Applications
102