728 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 11, NO. 7, JULY 2002
On Optimal Linear Filtering for Edge Detection
Didier Demigny
Abstract—In this paper, we will revisit the analytical expressions
of the threeCanny’scriteriaforedge detection quality: good detec-
tion, good localization, and low multiplicity of false detections. Our
work differs from Canny’s work on two essential points. Here, the
criteria are given for discrete sampled signals, i.e., for the real, im-
plemented filters. Instead of a single-step edge as input signal, we
will use pulses of various width. The proximity of other edges af-
fects the quality of the detection process. This is taken into account
in the new expressions of these criteria. We will derive optimal fil-
ters for each of the criteria and for any combination of them. In
particular, we will define an original filter which maximizes detec-
tion and localization and a simple approximation of the optimal
filter for the simultaneous maximization of the three criteria. The
upper bounds of the criteria are computed which will allow users
to measure the absolute and relative performance of any filter (in
this paper, exponential, Deriche, and first derivative of Gaussian
filters will be evaluated). Our criteria can also be used to compute
the optimal value of the scale parameter of a given filter when the
resolution of the detection is fixed.
Index Terms—Edge detection, optimal filter, quality criteria.
I. INTRODUCTION
F
OR EDGE detection, different approaches [1] have been
followed, such as mathematical morphology, Markov
random fields, surface models, or PDE [2], [3]. The most
common method is still the derivative approach with linear
filtering. Many derivative filters have been studied and used to
compute the intensity gradient of gray-level images:
1) Roberts, Sobel, or Prewitt operators [4];
2) finite impulse response filters with a large kernel, such as
Canny’s filters [5];
3) first-order recursive filter known as exponential or Shen
filter [6], [7];
4) second-order recursive filter [8];
5) first derivative of the Gaussian function.
A. Criteria for Edge Detection Quality
Some of these filters (Shen, Deriche, and Canny) have been
derived from optimal criteria. The ones that are best defined are
based on Canny’s theory: good detection, good localization, and
low multiplicity of the response to a single-step edge [5], [9].
Many improvements have been made to adapt Canny’s criteria
in order to enable the detection of roofs or ramp edges [10] or
to include a resolution hypothesis [11]. Canny’s definition of
localization has been criticized and a new definition has been
Manuscript received December 11, 2000; revised February 14, 2002. The as-
sociate editor coordinating the review of this manuscript and approving it for
publication was Prof. Uday B. Desai.
D. Demigny is with the Image and Signal Processing Research Laboratory
(ETIS), Cergy Pontoise University/ENSEA, 95000 Cergy Pontoise Cedex,
France (e-mail: demigny@ensea.fr).
Publisher Item Identifier 10.1109/TIP.2002.800887.
proposed [12]. A combined criterion for detection and localiza-
tion has been given in [13]. One of the major drawbacks of all
these criteria is that they only work on the domain of continuous
signals. We have proved in [14] that Canny’s criteria cannot be
used for applied filters defined in the domain of the sampled
signals. Great differences appear in the results and the filters
that are optimal in the continuous domain are not optimal in the
sampled domain. Furthermore, the criteria cannot easily be used
to compare the performance of filters. How useful is a criterion
that defines an optimal filter but does not permit a comparison
between this filter and the others? What is the equivalent of the
Sobel filter in the continuous domain?
The fact that Canny imposes continuity of the impulse re-
sponse in its center is also unsatisfying. This hypothesis is not
satisfied by all filters (e.g., exponential or difference of boxes
filters). The behavior of these filters cannot be reflected by the
original criteria results. Another major drawback is the shape of
the input signal used to define the criteria: a single-step edge.
The absence of other edges in the neighborhood allows the use
of arbitrarily large filters which enhance the detection without
deteriorating the localization. This is unrealistic.
B. Our Contribution
The main hypothesis of our approach is to work directly with
signals in the sampled domain and to consider as input a pulse of
a given width
. The criteria are then defined and optimal filters
for the width
(i.e., for a given resolution) are computed. In
[14], we also worked with discrete signals, but the localization
criterion that we have defined was too complicated to allow an
easy comparison between filters and the computation of optimal
filters. The use of a pulse and its effect on the resolution and on
the filter scale parameter was already touched upon in [15], but
not really investigated.
In Sections II–IV, for each of the three criteria, respectively,
we have established the analytical expression of the criterion
when the input is a sampled pulse. Then, we compute the im-
pulse response of the filter that is optimal according to this cri-
terion. Finally, this permits the computing of an upper bound on
the performance of any sampled filter.
In Section V, we derive the expression of the optimal filter
for the detection-localization product. In contrast with Canny’s
conclusion, we can prove that the best filter is not the difference
of boxes filter (DOB) but a combination of exponential filters.
The DOB filter is only optimal when the nearest edge is at an
infinite distance, which is unrealistic.
In Section VI, the filter that optimizes the product of the three
criteria is computed. We can also give two different approxima-
tions of this filter that can be more easily implemented.
In Section VII, the different optimal filters are first mutu-
ally compared in order to select the most efficient one. Then,
1057-7149/02$17.00 © 2002 IEEE