The new method proposed in this paper uses Sobel
operators with a fixed aperture size of 3 for gradient
magnitude extraction. Even if the gradient approxi-
mation with Haar-features is done over a region with
higher dimensions for the process to be less sensitive
to noise, a good practice is to initially apply a me-
dian filter to reduce the salt and paper noise. The
ratio between the two values of the hysteresis thre-
shold is considered 1/2, thus only the higher one of
the thresholds is computed at one point of time, ℎ,
as a linear combination of the values of the two
types of Haar-like features, as shown in (1). The
level of granularity is set by the user through the
parameter . It represents the minimum required
ratio between the normalized gradient magnitude
and the normalized approximated magnitude with
the two region Haar-like feature. The features’ di-
mensions considered are set with implicit values. If
any kind of depth measurements are available (ste-
reo vision or laser), the algorithm can be designed to
use adaptive features dimensions that are indirectly
proportional with the depth at the considered pixel.
In our experiments, they were set in order to reduce
the errors induced by the geometrical rotation of the
features. The orientation of the gradient magnitude
is a multiple of 45
, so diagonal orientation can ap-
pear and rotated Haar-like features are used by the
algorithm. If the dimensions of the straight features
are
(
ℎ,
)
, trying to maintain the features areas
measured in pixels, the rotated features dimensions
would be ℎ ∙
√
,∙
√
. During the experiments, the
dimensions values for the straight feature 2 are
set to
(
14,14
)
, resulting the values
(
9.89,9.89
)
for
the rotated feature, approximated with the rounded
values (10,10). A scratch is considered to have a
maximum width of 3 pixels. Therefore for the three
rectangle Haar-like feature type 3, three features
are computed, with the dimensions equal with (9,9),
(9,6) and (9,3). The approximated dimensions of the
rotated features are (6,6), (6,4) and (6,2). Because of
the Haar-like feature type constraints, just two ro-
tated features are computed, with the dimensions of
(6,6) and (6,3).
5 EXPERIMENTAL RESULTS
The results of the proposed algorithm, tested on
three outdoor image datasets with natural light con-
ditions, are presented in this section. These results
were compared with the output of the algorithm of
Canny for edge extraction. Attention was paid to
how each algorithm is performing in the same envi-
ronmental conditions.
The hysteresis thresholds of the algorithms are
initially set to perform a good edge extraction under
optimal light conditions. The Canny hysteresis thre-
shold is set at the values of (100, 200), which main-
tain a high detail rate under optimal conditions. In
the case of the proposed method, the threshold is
tuned to report edges with the magnitude of the gra-
dient bigger than it’s approximation with Haar-like
features. The detection of a scratch increases this
threshold with an amount of 10% of the maximum
gradient magnitude computed with the Sobel opera-
tor. With this configuration, the algorithms are tested
on image datasets where the amount of light is in-
creased or decreased by natural causes.
First, the algorithm was analyzed on two sets of
images which are part of the AMOS dataset
1
(Arc-
hive of Many Outdoor Scenes). The images are cap-
tured with static cameras during a period of one
week, registering one frame at every 20 minutes.
The first set is taken at the University of Missouri
and contain images captured at different moments of
time during the day, in clear weather conditions. The
amount of light from the images is varying because
of the changing of position between the sun and the
camera. It can be observed in figure 6 that the pro-
posed algorithm output is more stable to the light
amount variations than the edge extraction result
obtained with the algorithm of Canny. A more stable
result is also obtained on the images taken with rain
or fog weather conditions and contained in the
second dataset (figure 7), representing the Liberty
Statue.
The third dataset used to analyze the algorithms
output is taken with a dynamic camera in a real-
world scenario, in the surroundings of the University
a
b
c
Figure 6: Results comparison on the University of Mis-
souri dataset: unprocessed image (a); edge extraction re-
sults with the proposed algorithm (b); edge extraction
results with Canny operator (c).
1
The AMOS dataset is available online at: www.
cse.wustl.edu-/~jacobsn/projects/webcam_dataset/
NOVEL ADAPTIVE EDGE DETECTION ALGORITHM USING HAAR-LIKE FEATURES
147