On the Detection of Step Edges in Algorithms Bsed on Grdient Vector Anlysis A. Lrr6, E. Montseny Computer Engineering Dept. Universitt Rovir i Virgili Crreter de Slou sin 43006 Trrgon, Spin Emil: lrre@etse.urv.es Abstrct. The study presented in this pper is n nlysis for finding wht is the minimum signl-to-noise rtio tht must hve contour in order to llow its detection. For finding this minimum, ll the study hs been bsed on the nlysis of the grdient vector, becuse this kind of lgorithms re those which obtin best results. It cn be concluded tht: ) The nlysis of the grdient vector rgument is more robust thn the module; b) A contour must hve signl-to-noise rtio greter thn 4/5 in order to be detected, if smll opertors re used to obtin the grdient vector, nd so good contour loction be ssured. 1. Introduction Since the beginning of 60's, mny contour extrctor lgorithms hve been developed. A contour in n imge llows to obtin very importnt feture of the objects in the scene: the shpe of these objects. This feture is used to get n object description for its lter recognition [10]. At this moment, there is not generl purpose edge detector lgorithm useful for ny kind of imges independently of the scene chrcteristics. There re mny fctors who ffect the contour obtining process. Now, lgorithms bsed on the 1st derivtive re the most importnt. In [6], Hrlick sttes tht one edge extrctor is better thn nother if reducing the informtion of the imge (tht is, dding noise) preserves its behvior. Hrlick sttes tht ny edge extrctor obtins good results in bsence of noise. The processing of noise is the min problem in modem edge extrction lgorithms. So, Dvis in [4] lists the min fctors dding noise in the imges. These fctors re photon noise, defocusing nd texturl structure of the objects. For this reson the noise immunity of the contour extrctor lgorithms must be one of its most importnt fetures. At present, there re some lgorithms tht permit good contour extrction in noisy imges. These lgorithms re Cnny [3], Deriche [5] nd Mrr-Hildreth [8], ll of them bsed on the grdient vector nd 2nd directionl derivtive nlysis. This work studies when n edge cn be detected in function of its signl-to-noise rtio (SNR) with different lgorithms bsed on the grdient vector nlysis. The section 2 of the pper gives the problem of edge detection depending on the noise nd
412 the contrst. In section 3 the influence of noise in the grdient vector is studied. Finlly, in function of this noise, the minimum contrst to be detected is nlyzed. 2. Problem Definition V.S. Nlw [9] defines n edge s locl discontinuity in the illumintion function defining scene. A discontinuity of the nth order is defined s function whose nth derivtive contins delt function. Dvis [4] clssified the edges of scene in three clsses ccording to their profile. These re: lines (discontinuity of order 0), figure l; steps (discontinuity of order 1), figure lb; nd roofs b (discontinuity of order 2), figure lc. The discontinuities of greter orders re not relevnt. The mjority of lgorithms ttempt to ~ e solve the problem of extrcting step edges s these re the ones tht pper most frequently Figure 1 in ny scene. In rel imges, there re some fctors tht produce discontinuities in the illumintion function, nd they re not rel contours. In the imge of figure 2- pper discontinuities ssocited to the noise, there re mny discontinuities but they re very smll. In figure 2-b ppers discontinuities due to chnges in the illumintion of the scene. In figure 2-c, shows discontinuities due to rel contours..'.,,", "... E'. ; "-- " ',~.-.-" ' 2-'." ~.'- '." L I i " "'l-". ",".r-. -~,.,~ "_. --~,., : ;.~,_~-"~, '~.'- ' ~'~.~, -',-,- '_" ~.,;,IA Figure 2 Hrlick sttes tht in imges with very low level of noise, ll the edges cn be detected with ny lgorithm. In this cse contours with very low contrst, cn be detected. An exmple of this sitution ppers in figure 3-. It hs circle t the center of the imge with very low contrst. Figure 3-b shows the contour extrcted with Cnny lgorithm. But when the sme imge hs higher level of noise, like figure 3-c, contours with low contrst re more difficult to detect. Figure 3-d shows tht the circle hs not been detected. This exmple explins tht the detection of contour depends on its SNR.
413 ~":"," ' ',',' :'?~:'..~i 9.; e -~, -:_:,,~,.;, ~,,~-,., ~,..'"';_..'..:..~ -. ~',,.~ ~.~. -.. -, ~ ~,-,. ',,r..: ~, ", ~ 9 -~ :.,,~ V, ~'.,;" :;~,~'-.;,., : "'.~'..~ Figure 3 This work nlyzes problems introduced by the noise, trying to find the minimum SNR tht rel contour must hve, in order to be detected. d 3. Anlysis of the contour detection A contour in n imge defines discontinuity of the illumintion function. Those rguments of the grdient vectors ner of the contour chnge continuously long the contour nd their modules hve higher vlues thn the rest of the imge. For this reson, contour cn be detected with: ) the nlysis of the grdient vector rguments, b) the nlysis of the grdient vector modules, or c) the nlysis of both, modules nd rguments. Becuse of the objective of this work is looking for the minimum SNR, it studies only stright step edges. For curved edges the SNR will be equl or higher. In order to ssure good loction of the contour, the opertors for the grdient computtion must be smll. In the nlysis mde in this pper, the grdient vectors re obtined with two pirs of opertors: the first pir re 3x3 sized, tht loctes the grdient vectors t the center of ech pixel, nd the second pir re 4x4 sized, tht loctes them t the intersection of every 4 pixels. So, more dense mp of grdient vectors is computed. Ellipticl neighborhoods of different sizes hve been considered for this nlysis. These clss of neighborhoods used in the edge detection lgorithm in [7] hve 7, 13 nd 19 grdient vectors inside them tht re oriented depending on the direction of the centrl grdient vector of the stright edges used for this nlysis. Figure 4 shows these ellipticl neighborhoods for horizontl contours. I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I Figure 4 Different vlues of the SNR hs been considered for this study. The stndrd devition of the noise is fixed to 20, nd the contrsts of the contours nlyzed re 1, 2, 4, 8, 12 nd 16 gry levels per pixel. So, the SNR re defined s 1/20, 1/10, 1/5, 2/5, 3/5 nd 4/5 respectively.
414 In order to compre the different nlysis mde in this work, the following qulity fctor is defined: where n: Number of contour pixels detected. n n': Number of contour pixels in the imge. 7/= n'+(n"-n) n": Number of pixels detected s contour (flse detection included). The vlues of n, n' nd n" re obtined s follows n=m.pc(i,n,t) n'= M. C n"= M.[C. pc(i,n,t)+(1-c)pnc(i,n,t)] where M is the number of pixels in the imge, nd C is the rtio of contour pixels in the imge. The vlue of Pc (i, N, t) depends on the nlysis. In the cse of the rgument nlysis Pc (i, N, ) is the probbility tht t lest i rguments of the N I g grdients vectors in the ellipse fulfill Itxj- iq _< c~ when the centrl point of the ellipse is contour pixel, j represents the set of the grdient vector rguments inside the ellipse. In the cse of the module nlysis Pc (i, N, m) is the probbility tht t lest i modules of the N grdients vectors in the ellipse fulfill m) > m when the centrl point of the ellipse is contour pixel, m~ represents the set of the grdient vector modules inside the ellipse. The vlue of P,c q, N, oc) is similr to Pc (/, N,) but it corresponds to the cse when the centrl point of the ellipse is non-contour pixel. These vlues re different for different vlues of SNR. An exmple of these functions re shown in figure 5. Figure 5- represents the probbility function pc (13,13, ) for the rgument nlysis, nd figure 5-b represents the probbility function Pc (13,13,m) for the module nlysis. In both cses the SNR is 3/5 nd they re obtined in heuristic nlysis. The X xis represents the threshold nd m respectively. o02i 002T o.o, I o.o, 1 o.o, 1 o.o, 1.... ~176176....... 0 45 90 135 180 0 4 8 12 16 20 24 Figure 5 Figure 6 represents n exmple of the qulity fctor. Figure 6- for the rgument condition nd figure 6-b for the module condition. It corresponds to the sme cse s figure 5. The Y xis represents the qulity fctor nd the X xis represents the threshold. A 10% of contour pixels in the imge is ssumed. So, C=0.1. b
415 0.5 0.4 0.3 0.2 0.1 O ;............. 0 45 90 135 180 0.3 0.2 0.1 0 0 2 4 6 8 10 12 14 16 Figure 6 The most importnt vlue of these functions is the mximum nd their thresholds. So, in the cse of the rgument the best threshold is 86 ~ where the qulity fctor is 0.506, nd the best threshold for the module is 12 where its qulity fctor is 0.232. These re not the best qulity fctors for the ellipticl neighborhood of size 13. For the rgument the best qulity fctor is when t lest 12 of the 13 grdient vectors Coc(12,13,~z)) fulfill the condition. In this cse the qulity fctor is 0.536 with threshold of 72 ~ With the module, the best qulity fctor is when t lest 5 of the 13 grdient vectors (Pc(5,13, m)) fulfill the condition. Here, the qulity fctor is 0.399 with threshold of 6. Tbles 1 shows the bests qulity fctors for different SNR, nd different sizes of the ellipticl neighborhood for the rgument nlysis, the module nlysis, nd the module nd rgument nlysis. In ech cell of the tble there is the best qulity fctor tht belongs to the best threshold, nd in the cse of the rgument nlysis nd the module nlysis how mny grdient vectors must fulfill t lest, the condition. b Argument Anlysis Module Anlysis Argument nd Module Anlysis Ellipse Contrst = 4 Size SNR = 1/5 7 0.161 (6 from 7) 13 0.179 (9 from 13) 19 0.202 (14 from 19) 7 0.104 (5 from 7) 0.109 13 (5 from 13) 19 0.113 (11 from 19) 7 0.162 13 19 Contrst = 8 SNR = 2/5 0.281 (6 from 7) 0.343 (11 from 13) 0.409 (15 from 19) 0.170 (2 from 7) 0.204 (5 from 13) 0.235 (9 from 19) 0.298 Contrst = 12 SNR = 3/5 0.421 (7 from 7) 0.536 (12from 13) 0.636 (15 from 19) 0.311 (2 from 7) 0.399 (5 from 13) 0.478 I8 from 19) 0.475 Contrst = 16 SNR = 4/5 0.561 (7 from 7) 0.705 (12 from 13) 0.805 (16 from 19) 0.483 (3 from 7) 0.625 (6 from 13) 0.732 (9 from 191 0.652 0.180 0.356 0.580 0.776 0.203 0.427 0.682 0.866 Tble 1 The conclusions of the results of this tble re discussed in the next section.
416 4. Conclusions The most importnt conclusions of this work re the following: - The rgument of the grdient vector is more robust thn the module for the detection of step edges. This mens tht the informtion of the rgument llows to detect contours with lower contrst thn the informtion of the module. - The results of nlyzing module nd rguments together re only little better, but the lgorithm would be more complex thn the other cses. - The detection improves with the number of grdient vectors nlyzed. The number of grdient vectors is limited becuse of the region to be nlyzed must be over the contour. In curved lines the region to be nlyzed must be curved too, in order to follow the sme direction of the contour. - Lrger opertors for the grdient vector obtenfion improve the detection of the contour, but it must be smll to ssure good loction. - Contours with SNR of 2/5 re very difficult to detect. Contours with SNR of 4/5 cn be detected with good results with the rgument or the module informtion nd n ellipticl neighborhood of size 13. References [1] Kim L. Buyer, Sudeep Srkr, "On the Locliztion Performnce Mesure nd Optiml Edge Detection," IEEE Trns. on PAMI Vol. 16 No. 1 (106-110) Jnury 1994. [2] J. Brin Bums, Allen R. Hnson, Edwrd M. Risemn, "Extrcting Stright Lines," Computer nd Informtion Science Dept. Tech. Rep. 84-29, Univ. of Msschusetts, December 1984. [3] John F. Cnny, "Finding Edges nd Lines in Imges," MIT., Cmbridge, Tech. Rep. 720, June 1983. [4] L.S. Dvis, "A Survey of Edge Detection Techniques," Comp. Grph. nd Imge Proc., 4 (248-270) 1975. [5] R. Deriche, "Using Cnny's Criteri to Derive Recursive Implemented Optiml Edge Detector," The Int. Jour. of Comp. Vision, 1 (167-187), 1987. [6] Robert M. Hriick, "Digitl Step Edges from Zero Crossing of Second Directionl Derivtives," IEEE Trns. on PAMI Vol. 6 No.1 (58-68) Jn.1984. [7] Albert Lrr6, Edurd Montseny, "A Step Edge Detector Algorithm Bsed On Symbolic Anlysis," 12th IAPR Inter. Conf. on Pttern Recognition, Vol. 1 (6-10) October 1994. [8] D.C. Mrr, E. Hildreth, "Theory of Edge Detection," Proc. of the Royl Society of London, Series B, Vol. 207 1980. [9] V.S. Nlw, T. O. Binford, "On Detecting Edges," IEEE Trns. on PAMI Vol. 8 No.6 (699-714) November 1986. [10] Azriel Rosenfeld, M. Thurston, Y. Lee, "Edge nd Curve Detection: Further Experiments," IEEE Trns. on Comp., Vol.C-21 No.7 (677-710) July 1972. [11] Vincent Torre, Tomso Poggio "On edge detection," IEEE Trns.PAMI Vol. 8 No.2 (147-163) Februry.1986.