You are on page 1of 4

AN EDGE DETECTION ALGORITHM

USING A LOCAL DISTRIBUTION


S. Bagher Rezazad

Ahmad Ayatollahi

Iran University of Science & Technology


avatollahi@,iust.ac.ir

sbrezazad@hotmaiI.com

Abstract

2. BASE IDEA

The recently effective edge detection methods have


computational complexity. In this paper, a new algorithm
is proposed which is simple and fast. First, a set ofpoints
in an image is chosen which forms small squares. The
value of each point is calculated using a lowpass filter.
The values of other points can be calculated by using the
local linear distribution. It is possible that there is a curve
corresponding to each level in any square. Therefore,for
each level, one or more closed curves are formed in the
full image. These curves are the edges of the image. Now,
a set of levels must be chosen so that their corresponding
curves produce the desired edges. If a larger number of
levels are used, more details will be detected, otherwise
only the objects will be recognized. This algon'thm is easy
to implement and very fast in execution, and can be used
in a variety of applications such as normal edge detection,
object detection. boundary detection and detecting objects
as polygons, this assists in recognizing the shape and
calculating the volume,gravity center and etc.

Keywords: Edge Detection; Boundary Detection; Object


recognition; Contour Tracing; Image Processing.

2.1 Linear Distributions and Local Edge


Consider a square as shown in figure 1. If L,, L2, L3
and 4 are the gray level values corresponding to the
points of the square, we can calculate values of all the
points by using the linear distribution. Suppose that Land Lare the minimum and maximum values of the L,,
L2, L3 and L4, respectively. For each level (L), in the
interval [L-, L-1, there is a line that all of its points
have the values equal to L. This line is known as the local
edge corresponding to L. There are two special cases, the
first case occurs when L- is equal to L-. In this case,
there is no edge. The second case occurs when (a) L1 > L,
L2 < L, L3 > L and L4 < L, or @) Li < L, L2 z L, L3 < L
and L4 > L. In this case, there are two lines as edge.
The detected edges can be described in pixel form or
in line form with two points. The pixel form is used for
edge image output whilst the line form is used for polygon
form output. In the line form, the point coordinates can be
in integer or floating point format depending on the
application.

1. INTRODUCTION
The edge detection process is useful for analyzing
images. Most edge detection algorithms use the gradient
operators such as Sobel, Robert, Prewitt, and Canny
operators [1,2,3,4] or other difference calculations such as
fmt and second derivatives [4]. Therefore, an edge
intensity corresponding to each point is obtained. A
threshold value is required to identify the real edges [4].
For these algorithms complex calculations are needed to
increase the accuracy and performance. Also the output of
these algorithms is often, an edge image that must be
analyzed using a complex post processing. Thus the
process time is increased and the speed is very low. In this
paper, an algorithm is proposed that (a) doesn't use any
difference operation, (b) reduces the calculation
complexity, and (c) is able to give the results as an image
or several polygons.

Fig. 1. Local edge scheme

2.2 Image Division and Local Edges


Suppose that the original image is divided into small
equal sized squares, as shown in the Fig.2. Considering
the suitable values for the cross points, we can fmd the
local edges corresponding to the chosen gray Level, L, in

CCECE 2003 - CCGEI 2003, Montreal, May/mai 2003


0-7803-7781-8/03/$17.00 8 2003 IEEE
- 1183

all squares by using the local linear distribution. These


local edges form an edge image for gray level L. Smaller
square sizes increase the accuracy and detection of more
details, and the larger square sizes increase the speed of
the process.

number of levels in the set and the their gray level .values
depend on the application. If a large number of levels are
used, more details will be detected, otherwise only the
objects will be recognized. To choose the desired 'levels,
several methods are available. One method is using the
threshold values of the image. To find the thmshold
values, the image's histogram can be used. Generally, the
histogram of the image is divided into two or more
sections with approximately equal frequency content. The
boundary values can he the desired levels.

4. NORMAL EDGE DETECTION

Fig. 2. image division to small squares

The obtained edges for a specified level are linked


and form one or more closed curves. Thus, the edge
linking process is not required and the process time is
decreased.

2.3 Values of the Cross Points


In the proposed algorithm only the values of the
cross points of the squares are used in edge detection
process. This increases the speed, but there are many
pixels in the image that are not used in the process and the
accuracy is decreased. To prevent this, the values of the
cross points are replaced with the output of a lowpass
filter. This filter can be an averaging or median filter with
a fixed window size. If the filter window size is large, a
higher number of pixels will be used in the process and
accuracy is increased. If the filter window size is small,
the speed will increase. Therefore, depending on the
application, the optimum s u e of the filter window must be
set. Normally, if the filter window size is equal to square
size, all pixels of the original image are used in the edge
detection process, only once.

The most normal application for the proposed


algorithm is normal edge detection and obtaining the final
edge image. The first step is choosing a desired set of
levels. It is clear that there can be several edges or inon at
all in each square. In real conditions, if the squares are
small enough, it is not expected that there is marc than
one edge in each square. To have a maximum of one edge
in each square, there are two possibilities. The first
possibility is prioritizing the levels in the set. If a level
with higher priority creates an edge, the lower priority
levels will be ignored. The second possibility is choosing
the best level from the set. For example, the median value
of the levels that have an edge in the square is chosen.
In addition due to the lack of differences it is possible to
create ineffectual short edges. To prevent this it is possible
to ignore the squares that have a standard deviation
smaller than a threshold value.

3. CHOOSING A SET OF LEVELS TO

CREATE THE FULL EDGE IMAGE


As mentioned above, for each specified gray level,
there is an edge image. The final edge image includes
several individual edge images. Now, we must find a set
of gray levels to be the desired full edge image. The

- 1184

5. OBJECT DETECTION
Object detection is another application for this
algorithm, which ignores the edge details. For (object
detection it is better to increase the size of the filter
window. In this circumstance by blurring the image
hluning the image weakens the detail and the edge
detection process is orientated to object detection.
Since for object detection closed curves are required. none
of the local edges can be ignored, unlike the normal edge
detection.
To prevent the creation of ineffectual short edges, it
is possible to delete the objects, which have a smaller area
than a threshold value. To avoid complexity, instead of
calculating the area of the object, it is possible to use the
numher of squares that incorporate an edge.
In the images that the light distribution is not
homogenous, some objects are detected as several
segmented objects. To avoid this, we can use a non-linear
function of gray levels vs. the image coordinates.

6. BOUNDARY DETECTION
Usually the edges obtained from edge detection
process are linked and form the boundaries. Edge liking
is a complicated and time-consumingprocess. with
to the proposed algorithm, the edges obtained are created
continuously linked. This eliminates the edge liking
process; therefore the process time is reduced
dramatically.

D. This algorithm covers the various edge detection,


boundary detection, detecting the object as an image or
polygon.
E. Having the object as a polygon allows the physical
analysis of the image. This feature has a wide range of
applications.
F. In object detections as a polygon, the required memory
for result storage is dramatically reduced.

7. DETECTION OF THE OBJECT AS


POLYGON
Unlike the three previous kinds of applications, it is
possible to regard the local edges as a line with two
coordinates, which are integer or floating point.
In this case the objects that are created as a closed curve,
are formed as a polygon. This assists the physical
characteristic calculations of the object, such as size,
gravity center, shape and average light intensity, which
eases the analysis of the image content.

8. EXPERIMENTAL RESULTS
Fig. 3(a) shows a 720x576 original image. The
result of normal edge detection is shown in Fig. 3@). In
this process three levels are chosen, and, the square size
and the filter window size are equal to 3. The edge image
includes many of edges in detail.
Fig. 4(a) shows a 420x528 CT image. The result of
proposed algorithm for boundary detection and object
recognizing are shown in Fig. 4(b) and 4(c), respectively.
In these processes only one level is chosen, and, the
square size and the filter window s u e are equal to 3.

9. CONCLUSION
The features of this approach are as follows:
A. Due to the reduction of the points that are directly
calculated in the edges, the computational load and
process time are decreased.
B. Due to the nature of the algorithm, it is possible to
process the image using a multiprocessing approach, even
in object detections. Therefore the processing time is
reduced additionally.
C. This algorithm is very flexible, and can be adjusted to
meet the various speed, and accuracy requirements of the
applications.

@)
Fig. 3. (a) Original image and (b) Its normal
edge image

1185 -

REFERENCES
[I] Gonzalez, R., Digital Image Processing, Addison,
1992.
[2] S. Banks, Signal Processing, Image Processing and
Pattem Recognition, Prentice Hall, 1989.
[3] B. McCane, Edge Detection.
[4] Canny, J., A computational approach to edge
detection, IEEE Transaction on Pattem Analysis arid
Machine Intelligence, vol. 8, no. 6, pp. 679-698,
November 1986.

(4
Fig. 4. (a) A CT image, (b) A boundary
detected image, a n d (c) An detected object

- 1186