A Contour-Based Separation of Vertically Attached Traffic Signs
Total Page:16
File Type:pdf, Size:1020Kb
A Contour-based Separation of Vertically Attached Traffic Signs Ping Zhao Master Thesis 2007 Nr: E3561D Ping Zhao Degree Project E3561D Nov, 2007 DEGREE PROJECT Computer Engineering Program Reg Number Extent Master Science of Computer Engineering E3561D 30 ECTS Name of Student Year-Month-Day Ping Zhao 2007-09-30 Supervisor Examiner Hasan Fleyeh Mark Dougherty Department Supervisor at the Company/Department Department of Computer Engineering, Hasan Fleyeh Dalarna University Title A Contour-based Separation of Vertically Attached Traffic Signs Keywords contour, road and traffic sign, shape decomposition, black noise elimination Abstract This report presents an algorithm for locating the cut points for and separating vertically attached traffic signs in Sweden. This algorithm provides several advanced digital image processing features: binary image which represents visual object and its complex rectangle background with number one and zero respectively, improved cross correlation which shows the similarity of 2D objects and filters traffic sign candidates, simplified shape decomposition which smoothes contour of visual object iteratively in order to reduce white noises, flipping point detection which locates black noises candidates, chasm filling algorithm which eliminates black noises, determines the final cut points and separates originally attached traffic signs into individual ones. At each step, the mediate results as well as the efficiency in practice would be presented to show the advantages and disadvantages of the developed algorithm. This report concentrates on contour-based recognition of Swedish traffic signs. The general shapes cover upward triangle, downward triangle, circle, rectangle and octagon. At last, a demonstration program would be presented to show how the algorithm works in real-time environment. Dalarna University 1 Tel: +46 (0)23 778000 Röda vägen 3 Fax: +46 (0)23 778080 S-781 88 Borlänge http://www.du.se Sweden Ping Zhao Degree Project E3561D Nov, 2007 Acknowledgement This work was supported by the Department of Computer Engineering at Dalarna University. I greatly acknowledge my supervisor, Mr. Hasan Fleyeh, for motivating this work and providing many advices and helps. During my Master studies, he taught me knowledge related to computer graphics, digital image processing and pattern identification, enabling me to stand on a solid background for this research work. He is not merely a good teacher at school but also a good father and husband at home. I am also grateful to Professor Mark Dougherty, Dr Pascal Rebreyend and all other teachers at Dalarna University for their indoctrination. I am also grateful to all my classmates, especially Shengtong Zhong, Yang Shen, Yi Feng, for their helps on my studies and all the friends in Sweden for sharing the wonderful memories. Last but no the least, I would like not merely give my special thanks to my girlfriend Tao Xuanyu, family members for their love and supports, but also to the gentle reader who is reviewing this report. Dalarna University 2 Tel: +46 (0)23 778000 Röda vägen 3 Fax: +46 (0)23 778080 S-781 88 Borlänge http://www.du.se Sweden Ping Zhao Degree Project E3561D Nov, 2007 Contents 1. Introduction...................................................................................................................7 1.1. Background........................................................................................................7 1.2. Problem Description ..........................................................................................9 1.3. Project Objective ...............................................................................................9 1.4. Swedish Road and Traffic Signs .....................................................................10 1.4.1. Warning Signs.......................................................................................10 1.4.2. Prohibitory signs ...................................................................................11 1.4.3. Mandatory signs ...................................................................................11 1.4.4. Signs giving information .......................................................................12 1.5. Properties of Road and Traffic Signs...............................................................12 1.6. Potential Difficulties .........................................................................................16 2. Algorithm Design ........................................................................................................18 2.1. Introduction......................................................................................................18 2.2. Algorithm Routines ..........................................................................................18 2.3. Binary Representation.....................................................................................19 2.4. Distance Measurement....................................................................................20 2.5. Similarity Measurement...................................................................................23 2.6. Derivative Model..............................................................................................26 2.6.1. Properties of Derivative Model .............................................................27 2.6.2. Usage of Derivative Model ...................................................................29 2.7. Noise Filter.......................................................................................................31 2.7.1. Noise Definitions...................................................................................31 2.7.2. White Noise Removal ...........................................................................33 2.7.3. Black Noise Elimination ........................................................................37 3. Experiments and Analysis ..........................................................................................46 3.1. Testing Case Generation.................................................................................46 3.2. Cross Correlation Threshold ...........................................................................49 3.3. Shape Decomposition Level............................................................................51 3.4. Separation Accuracy Evaluation......................................................................55 4. Conclusion and Future Work......................................................................................59 4.1. Project Summary .............................................................................................59 4.1.1. Overview...............................................................................................59 4.1.2. Advantages...........................................................................................59 4.1.3. Withdraws .............................................................................................60 4.2. Future Works ...................................................................................................61 Appendix ............................................................................................................................62 Appendix A. Matlab Program List...............................................................................62 Appendix B. Main Program Usage.............................................................................63 Appendix C. Statistical Analysis Program Usage.......................................................65 References.........................................................................................................................66 Dalarna University 3 Tel: +46 (0)23 778000 Röda vägen 3 Fax: +46 (0)23 778080 S-781 88 Borlänge http://www.du.se Sweden Ping Zhao Degree Project E3561D Nov, 2007 List of Figures Figure 1. Structure of Sign Detection and Recognition System...................................8 Figure 2. Examples of Warning Signs........................................................................10 Figure 3. Examples of Prohibitory Signs....................................................................11 Figure 4. Examples of Mandatory Signs ....................................................................11 Figure 5. Examples of Signs giving Information.........................................................12 Figure 6. General Shapes of Road and Traffic Signs ................................................13 Figure 7. Example of Bad Light Conditions................................................................14 Figure 8. Examples of Blurred Images.......................................................................14 Figure 9. Examples of Faded Images ........................................................................14 Figure 10. Examples of Occluded Images .................................................................15 Figure 11. Examples of Deformation..........................................................................15 Figure 12. Examples of Physically Damaged Images ...............................................15 Figure 13. Examples of Similar Colors.......................................................................16 Figure 14. Examples of Potential Difficulties..............................................................17 Figure 15. Outline of Algorithm Routines ...................................................................19 Figure 16. Example