1994 International S y m p o s i u m on Speech, Image Processing and Neural
Networks, 13-16 April 1994, Hong Kong. Edge Detection on Real Time Using
LOG ...
1994 International S y m p o s i u m on Speech,Image Processing and Neural Networks, 13-16April 1994, Hong Kong
Edge Detection on Real Time Using LOG Filter Shen Liqin , Shen Dinggang and Qi Feihu Fibre Optic Local Communication networks and Coherent Communication State Key Laboratory Shanghai JiaoTong University, 200052, China
A s t r ac t:
new technique is proposed for LOG filtering based on the method using look- up- table. We take advantage of the circularly symmetric characteristic of a LOG filter, then a look- u p -table with acceptable size is established. This transforms a large amount of multiplying operations into the easy looking u p a table operations.At the same time ,another mask which can form an adaptive threshold is added to the LOG mask so that the decision whether a edge exists o r not from the result of convolution can be made easily.As a result, LOG filtering becomes a method of edge detection on real time. This paper is arranged as follow: Section 2 is the analysis of LOG filter and the amount of operations of LOG convolution , some previous research for fast algorithm of LOG filtering is viewed , too. Then the implementation of LOG filtering method using three look-up-tables is presented in Section 3. Section 4 includes some experiment results.The conclusion is drawn in Section 5 .
In this paper a new technique is proposed for LOG(Laplacian O f Gaussian) filtering based on the method using look-up-table.We take advantage of the circularly symmetric characteristic of LOG filter, then a look-up-table with acceptable size is established.This transforms a large amount o f multiplying operations into the easy looking up a table operations.At the same time , another mask which can form an adaptive threshold is added to the LOG mask s o that the decision whether a edge exists or not from the result of convolution can be made easily.As a result,LOG filtering becomes a method of edge detection on real time.
1 Introduction Image segmentation is of crucial importance in an object recognizing system. Edge detection is most frequently used in image segmentation. There are two broad classes of edge detectors.0ne class includes many kinds of gradient operators such as Laplacinn operator, Robert operator and Sobel operator etc.. These operators are very sensitive to noise, so the effect of result is hardly satisfying.LOG filter is developed as a best filter simulating to human being’s vision system. The excellent edge information can be obtained using it.But the effect of edge detection is decided crucially by whether the sum o f LOG mask coefficients, values of LOG function on discrete points, is zero or not. In order to extract edges effectively, the width of LOG mask must be chosen much larger compared to those of general gradient operators So the amount of operations of computing convolution of the original image with a LOG mask is unendurable in many applications. especially for the object recognizing system on real time.There is a lot of research work for fast algorithm of LOG filteringIl1 I21 I51 I61.We’Il view these methods briefly later. In this paper, a
0-7S03-1865-X/94/$3.000 1994 IEEE
2
LOG F i l t e r a n d previous fast a l g o r i t h m of LOG convolution
LOG filtering includes sequential processing of smoothing for noise remove firstly and computing second derivative. Edges are identified as the locus of points where the second derivative of the filtered image is equal to zreo.
Fig. I 2 - D profile of LOG mask
37
ISSIPNN’94
rarely exceed size of 5 x 5 pixels. The times of multiplying operations for convoluting o f M*M image withsuch N*N masks are
LOG function in two dimensions is generally expressed as follow: 3G
3G
V"G(x,y,6) = - t 3x2
1
xatya (2 - )exp( - ) 6
(1)
2ha
6
It's a circularly symmetric function shown as Fig, 1 , T h e width of the central excitatory region of the operator is given by w = 2 2 6 . H'hen convolution is done on digital images, the sire of masks is always limited. Generally, if we chose the width of a mask as follow: N = 3 * 2 1 6 =8. 5 h the continuous curve o f the LOG function covers 9 9 . 7 % of the area, given an area very close to zero for the V 2 G . This means that the size of a mask is chosen based on the chosen spatial constants 6 . Berzin[4J has done deep research on accuracy of LOG edge detector and the conclusion was drawn: There is aliasing of geometric location using a LOG filter as a edge detector. The larger the spatial constants is , the more seriour aliasing is. With some constraints, this aliasing is not more than 6 ,Furthermore, the maximum aliasing is below 2 6 , As a result, i t is not suitable to choose a large 6 in order to obtain accurate locations of edges. On the other hand, the passband width of a LOG filter is constrained by 6 . A smaller 6 is correspondent to a wide passband , as a result, more detailed information of edges is included in the filtered image.On the contrary, a large 6 is correspondent to a narrow passband. S o the information of edges is much more brief. M u ~ t i s c a ~ i nimages g representation can be obtained with the different constants h . Generally a smaller 6 is chosen in image segmentation to assure that all useful information is included in filtered image, But too small h makes the ability of noise inhibition of LOG filter too weak Compromise should be made on the needs of applications. If we choose
i-
6
=
0.8
-
5
The size o f mask would be
N = 3
-
WIN)
Fast convolution algorithm for LOG filter must be developed to perform the convolutions in a reasonable amount of time. In paper[Zl, the author substituted DOG operator for LOG operator.
X2tf
=-
2n
(M-Ntl) '*NZ= 3 y a
43
I t is obvious that the size of LOG masks corresponding to a large b is much larger than that of conventional gradient operators which
1 DOG(x, y, 6 ., 6
1)
=
x2ty2
exp(-
~
3-76 e
--
) 262
I
x2ty2
exp ( -
imhI
1
12)
26:
With a suitable pair of h e and 6 I , this DOG function can match LOG function expressed as formula (1) accurately. Because Gaussian function is a seperable one,each of convolution can be realized a s successive one dimensional row and column convolution, this reducing the total number of operations to (M-NI11 * 4 N =
4MZN
The reduction of t h e total number of operations is slight. J . S.Chen[ll etc. proposed to decompose a LOG filter with spatial constant 6 t o two successive filters, one is Gaussian filter with 6 and the other is LOG filter with h 2 . They first convolved the image with a Gaussian filter, then reduced the resolution by decimating t h e convolved image, and convolves this reduced images with a smal! LOG mask. In oder to recover the f u l l resolution image, a interpolation is used at last.The amount of operations can be reduced by many times using this fast algorithm for a large 6 ,but for a smaller 6 , the decreasing of the amount of operations is not significant.
3
I m p l e m e n t a t i o n o f LOG f i l t e r i n g using Look-Up-Table
Implementation of LOG filtering using LUT is an easy. fast and effective method. The circularly symmetric characteristic of LOG function makes the size of a look-up-table acceptable , This assures the feasibility of our method presented here.
3. 1 S e t - u p o f discrete LOG masks
The discrete LOG masks fallowing fomula:
are
set
up
A look-up-table corresponding to the NxN mask for spatial constant 6 is set up with the size shown below:
using,
s
Ntl = -(
Nt1 t(-
2 W h e r e k is chosen to a s s u r e that the eum of mask coeficients is near to rero.This means k is chosen s o a s to “1)
/2
(N-1) 1 2
c c - (N-1) 1 2 J = - (N-1) 1 2
x’tyl (I-k-)exp
INtl) (Nt3) X
donated as LUT[ “1) (Nt3) /SI [ 2 5 6 1 shown as Table 1. Each element in the table is the multiple of the coeficient at location i in the m a s k shown as Fig. 3 and the greylevel from 0 to 255.That is:
-1 =o 2r 6
61
a
A t the same time,another mask which aims to form an adaptive threshod is added to the LOG mask, then a result m a s k is formed. Using the result maak,a decision whether a point is on the a edge or not can be made easily. At last, coeficient k is chosen for the result mask to assure that each coeficient of the mask is integer.
3. 2
256
0
Ptyl
(-
-1)t. . . t l ) X 2 5 6
2
LUTlil [jl = w(i) X j
.
where w(i) is the coeficient at location i in the m a s k Table 1 look-up-table
Set-up o f look-up-table.
According to the rules commented above,a N X N m a s k can be set up corresponding to the spatial constant 6 , shown as Fig. 2. Because of the circularly symmetric characteristic of LOG function, if we divide the whole m a s k into five a r e a s donated A-E, we’ I I find that block A and B a r e symmetic, block C and block ( At B) are symmetric versus x axis,block D and block ( At B) are symmetric versus point ( 0 , 0 ) , block E and block (AtB) a r e symmetric versus y axis, too.
-
3. 3 LOG convolution After the look- up- table is set up, LOG convolution became8 operations on r e a l time to look u p the look-up-table. The result of convolution at pixel (x,y) in an image is the accumulation of N X N values from the look-up-table according to the greylevel value of each pixel in N X N a r e a in the image where (I,y) is the center of this area.There are three mapping l a y e r s in this process.First, the mapping exists between location ( i, j) in the N O N area where i, j =-(N-I)/Z, . . . , (N-1)/2 and (i’tj’), then (i2tja) is mapped to the location in the m a s k defined as above range from 0 to T,These two mapping procees can be performed using look-up-table , too. In the end, the value from the look-up-table according to location(i, j ) and the greylevel at piont (xti,ytj) is obtained .There is no multiplying aperations in this process. T h e hardware to perform this process of computing convolution can be implemented easily and rapidly, too.
I
-N
Fig. 2 LOG mask
w (0) w(3)
w(2) w(4)
...
w(i-1)
W(l)
w(5)
...................
w(i) w(it1) ... ..........................
................................
w (T)
(Ntl) (Nt3) where
T=
a
4 The experiment results
-1
Fig.3 coeficients array in a m a s k 39
The original image Lenna was used to test our method. we chose three different spatial constant 6 and different width N of masks correspondingly. The experiment results are shown in Table 2 .
[3]
[41
(51
[61
[71
F # g B t h e filtered image r i t h
6 I 4
F i g 1 the I d t e r e d b a s e w i t h 6 5 0
The software was implemented in C and run under DOS 5. 0 in P C 386/33 The speed-up of convoluting is obvious If this process is implemented by hardware, the speed-up will be more significant Table 2: Experiment results 6
N*N
Timel ( 8 )
Time2 ( * * )
0. 3
313
0. 8 (sec.
5. 2 (sec. 1
6.5
1. 4
11'11
4 . 4 (sec.
45. 3 (sec. j
10. 3
5. 0
31*31
8(sec.)
129.6(sec)
16. 2
Speedup
Timel ( * ) time consuming using our method Time2 ( * * ) time consuming using conventional method
5
Conlusion We have presented a new technique to compute convolution which is based on the method using look-up-table,I t makes edge detection using LOG filter become a method on real time espesially with hardware implementation.
References: [ll J.S.Chen etc. ( 1987) , Fast Convolution with Laplacian of Gaussian Masks. IEEE Trans. on PAMI, No. 4: 584- 590. 121 W.E.L.Grimson & E.C.Hildreth(1985).Comments on 40
'Digital Step Edges From Z e r o Crossing of Second Directional Derivatives'. IEEE Trans. on PAMI,7: 121- 1 2 7 . Robert M. Haralick(l985). Digital Step Edges From Zero Crossing of Second Directional Der ivat ives. IEEE Trans. on PAMI,No. 1: 5 8 - 68 V. Berzins (1984), Accuracy of Laplacian Edge Operators. Comput.Vision, Graphics & Image Processing, 27: 195- 210. P.J.Burt(19831.Fast algorithm for Estimating local image properties. Comput. Vision, Graphics & Image Processing,21: 368-382 W.Wells(1986). Efficient synthesis of Gaussian filte s by cascaded uniform filters. IEEE Trans on PAMI,PAMMI-8:2 3 4 - 239. D . M a r and H.Hildreth(1980) . Theory of edge detec ion. Proc. Roy. Sco. London , B207: 187-217.