INTELLIGENT VISION SYSTEM FOR DYNAMIC ENVIRONMENTS A thesis submitted to the Department of Electrical Engineering, University ofMoratuwa in partial fulfillment of the requirements for the Degree of Master of Engineering By H.Y. ARUNA HEWAWASAM Supervised by: Dr. Lanka Udawatta Department of Electrical Engineering University of Moratuwa, Sri Lanka 2005 83813 Abstract This dissertation describes an intelligent vision system that absorbs useful information from its environment and draws useful conclusions. This system can give the instructions to locate vacant seats that are currently occupying in a cinema theater. Extraction of useful information without viewing or exposing inside details of an environment through an active vision system is proposed. Reasoning based conclusions are drawn for optimum searching. The effectiveness of the proposed method is demonstrated using an experiment. Three reasoning criteria are developed and experimentally tested for identifying the states of seats, States of seat can be vacant state, occupied state, or a state with an object placed on the seat. First criterion basically uses binary image analysis and with the introduction of white reference value it can also be applied for environments where there are intermittent variations of illumination level. Second criterion is based on the analysis of color image and it can be basically used for identifying objects placed on seats. Third criterion based on the analysis of intensity image. Intelligent vision system was developed using the combination of first and second criteria. The created graphical user interface provides links for setting up the system, and setup program i provides an interface and instructions for user to find seat locations and entering those locations in the main program and other setup programs. Setup program 2 is given for automatically calculating the other necessary parameters and white reference program for setting up white reference values. The intelligent vision system can be further developed and generalized for other applications.Mainly it can be used for intelligent building applications. For example in designing an intelligent room where the movements and changes occurring inside the room could be monitored using a camera system. In a multi storey building, required information of a particular floor that is used for common seating could be displayed at other floors. In a vehicle park, the registration number and the entering time of the vehicles could be recorded. Available parking spaces can be displayed at the entrance. DEC LARA TJON The work submitted in this dissertation is the result of my own investigation, except where otheiWise stated. It has not already been accepted for any degree, and is also not being concurrently submitted for any other degree ~± - H.Y.Aruna Hewawasam July 20, 2005 I endorse the declaration by the candidate. ___ [1£1!E__ --········-- Dr. Lanka Udawatta j -.. ACKNOWLEDGMENTS Thanks are due first to my supervisor, Dr. Lanka Udawattha, for his great insights, perspectives, guidance and sense of humor. My sincere thanks should also go to the other lectures, Prof. Lucas, Prof. Ranj ith Perera, and Prof. Sriyananda, who gave instructions and pointed out shortcomings during my presentations. l Sincere gratitude is also extended to the people who serve in the Department of Electrical Engineering, University of Moratuwa, Sri Lanka for helping in various ways to clarify the things related to my academic works in time with excellent cooperation and guidance. I should not forget the corporation and the support given by my family members, my wife, parents, and brothers. May be, I could not have made it without their support. I would also like the thank all of my friends who supported me in this attempt specially helping me to get pictures and setting up the camera etc Lastly, I should thank many individuals, friends and colleagues who have not been mentioned here personally in making this educational process a success . ._. H. Y.Aruna Hewawasam July 20, 2005 LIST OF FIGURES Figure Page 1.1 Intelligent Vision System Architecture 1.2 RGB Image Structure 5 2.1 Use of Marks on Seats 16 2.2 System Architecture for the Experiment 17 3.1 Repeated Dilations of Marker Image, Constrained by Mask/ 24 3.2 Intermediate Stages in Processing a Color Image 25 3.3 Matrices Ak and Ak 26 3.4 Use of Color Image Matrix 27 3.5 Creating Color Components Matrices 28 3.6 Improving the accuracy 33 (a) Improved seat marks (b) Fine thick edge marks 3.7 Effect of Enhancement 36 4.1 Seat Arrangement 37 4.2 Hall Arrangement 39 (a) Effective Length (b) Effective Width 6.1 Achieving Illumination Level Variation 53 6.2 Illumination Level Variation 54 6.3 Variation in Color Components with Illumination Level for White Color Mark 55 6.4 Variation in Color Components with mumination Level -- for Blue Color Mark 55 6.5 Variation in Color Components with Illumination Level for Yell ow Color Mark 56 6.6 Testing Different Types oflmages 58 6.7 Testing Different Types of Images 59 6.8 Testing Different Types of Images 60 6.9 Object Identification- Result 1 61 6.10 Object Identification - Result 2 62 7.1 Graphical User interface 64 7.2 Graphical User Interface Showing Setup Menu Options 65 7.3 Graphical User Interface Showing Help Menu Options 65 7.4 Results of Setting up Program 1 l 66 ... 7.5 Graphical User Interface Showing a Stage of Demo 1 68 7.6 Results of Demonstration 3- Result 1 69 7.7 Results of Demonstration 3 - Result 2 69 -- LIST OF TABLES Table 3.1 Condition Table 4.1 Example for Determination of 'd' Values 6.1 Variation in Color Components with Illumination Level 6.2 Summary of Object Identification Result i -" ---- Page 34 42 56 63 CONTENTS Declaration Abstract Acknowledgement List of Figures List of Tables Chapters 1 2 Introduction I .I Background and Literature Survey 1.2 ~otivation 1.3 Goals 1.4 Achievement m brief System Overview 2.1 The approach 2.1.1 White reference 2.1.2 Algorithms 2.2 System components 2.2.1 Camera 2.2.2 Transmitter receiver system 2.2.3 Computer 2.2.4 Lights I -" --- Page i ii iii IV vii 01 02 13 14 15 16 16 17 18 19 19 20 20 20 3 Image analysis 22 3.1 First reasoning criterion 22 3.2 Second reasoning criterion 27 3 .2.1 Determination of mark locations 27 3.2.2 Analysis for mark 1 28 3 .2.3 Analysis for mark 2 30 3.2.4 Analysis for mark 3 31 3.2.5 Ultimate reasoning 32 3.3 Third reasoning criterion 32 3.4 How to use criteria 1, 2 & 3 33 3.4.1 Condition table j 34 3.5 Detection of illumination level variation 35 3.5.1 White reference 35 3.6 Image enhancement 35 4 Setting up the system 37 4.1 Setup program 1 39 4.2 Setup program 2 41 4.3 White reference program 43 5 Image acquisition and processing 45 5.1 Image acquisition 45 5.1.1 Basic image acquisition procedure 45 5.1.2 Image acquisition algorithm 49 5.2 Image processing 49 5.2.1 Running algorithm 50 Experimental Results ..... 53 6 6.1 Intensity variation 53 6.2 Testing for different conditions 57 6.3 Object identification 60 6.3.1 Summary of the results 63 7 8 Graphical User Interface 7.1 Setup program 1 7.2 Setup program 2 7.3 White reference program 7.4 Demonstration 1 7.5 Demonstration 2 7.6 Demonstration 3 Concluding Remarks and Further Developments 8.1 Conclusions 8.2 Recommendations fo r Future Research .f ·"' References Appendices Appendix A : Graphical user interface program Appendix B : Running program Appendix C : Setting up program 1 Appendix D : Setting up program 2 Appendix E : White reference program Appendix F : Demonstration 1 Appendix G : Demonstration 2 Appendix H : Demonstration 3 --- 64 66 67 67 67 68 68 70 70 71 72 75 75 77 79 80 81 82 83 84