PERPUSTAKAAN UMP CLASSIFICATION OF Kf 1 I IH 111111111 iE PROCESSING 0000103183 REWATHI D/O KARUDAN A thesis submitted in partially fulfillment of the requirements for the award of degree of Bachelor of Science Computer (Graphic & Multimedia Technology) (Hons) Faculty of Computer System & Software Engineering University Malaysia Pahang (UMP) DECEMBER 2014 vi ABSTRACT Clarification of Key Lime base on color Image Processing is newly proposed system in the Malaysian agriculture field. Therefore, this system carried out to develop a prototype judging the Key Lime grade, maturity and to estimate the storage lifespan of Key Lime by color. The main issue that inspired to develop this system is the manual practice of Key Lime color grading consuming man power and time.At the same time the judgment of Key Lime color grading by human eyes often leads to error due to visual stress, and tiredness and is therefore not accurate. Other than that the human vision has limited ability in differentiating similar colors such as blue and violet. The issue is a human perception towards colors is subjective and varies among different people. Fifty five sample data of Key Limes were set in experiment to estimate the expiry date of key lime. During the system execution, image acquisition phase the image of the Key Lime should be in RGB color image. The grading systems computerized and web camera are used to capture the Key Lime image. The background (noise) of the image is removed by median filtering. A percentage of mean of green value was extract from RGB image for color information and sum of threshold image was collected. Then values are then being used as information for determining the grade and estimate expiry date of Key Lime. As conclusion the system was tested using 55 sample Key Limes. The final result of testing showed that 90% pass for grade A, 25 % pass for grade B, 71.43 % pass for grade C, 93.75% pass for grade D and overall passing percentage is 80.39%. vii ABSTRAK Pengkelasan limau nipis daripada wama boleh memberikan manfaat secara tidak langsung kepada sektor pertanian di Malaysia. Oleh yang demikian, sistem mi telah dibangunkan satu prototaip bagi menilai gred untuk menganggarkan tarikh luput limau nipis berdasarkan warna. Faktor yang menyebabkan system mi dibangunkan ialah pengelasan secara manual mangambil masa yang agak lama dan tenaga manusia.Selain itu, pengelasan oleh manusia mungkin tidak jim akibat daripada tekanan dan kepenatan. Mata manusia juga menpunyai kerumitan untuk mengasingkan warna seperti biru dan unggu. Seterusnya,manusia mempunyai persepsi yang berlainan terhadap warna. Bagi menjayakan sistem ini, lima puluh lima limau nipis telah digunakan untuk menjalankan eksperimen bagi mendapatkan hasil nilai gred untuk menganggarkan tarikh luput limau nipis berdasarkan warna. Sistem mi akan meggunakan sebuah kamera dan menangkap gambar limau nipis dalam format imej warna RGB. Selepas itu, latar belakang imej RGB akan dikeluarkan dengan menggunakan teknik menapis median. Akhirnya, peratusan wama hijau dikeluarkan daripada gambar. Hasil nilai tersebut digunakan untuk menentukan gred dan anggaran tarikh lupusan limau nipis. 1-Tasil terakhir daripada ujian sistem telah memperolehi keputusan seperti mi 90% lulus gred A, 25 % lulus gred B, 71.43 % lulus gred C,93.75% lulus gred D dan peratus kelulusan keseluruhan ialah 80.39%.. vii' TABLE OF CONTENTS CHAPTER TITLE 2 PAGE DECLARATION ii SUPERVISIOR'S DECLARATION iii DEDICATION iv ACKNOWLEDGEMENT v ABSTRACT vi ABSTRAK vii TABLE OF CONTENTS viii LIST OF TABLES xi LIST OF FIGURES xii LIST OF APPENDICES xiv INTRODUCTION 1.1 Background 1.2 Problem Statement 1.3 Objectives 1.4 Scopes 1.5 Significance of the study 1.6 Thesis Organization 1 1 2 3 4 4 LITERATURE REVIEW 2.1 Introduction 2.2 Overview 2.3 Exiting case study 2.3.1 Color grading in tomato maturity estimator using image processing technique 2.3.1.1 Method 2.3.1.2 Advantages and disadvantages of the system 2.3.2 Mango grading by using fuzzy image analysis 2.3.2.1 Method 2.3.2.2 Result and Discussion 6 7 8 9 9 5 9 11 12 12 14 ix 3 2.3.2.3 Advantages and disadvantages of the system 2.3.3 Objective color measurement of tomatoes and limes 2.3.3.1 Method 2.3.3.2 Advantages and disadvantages 2.4 Manual flow of key lime 2.5 Proposed new system 2.6 Conclusion 15 16 METHODOLOGY 22 22 22 24 25 27 28 28 29 30 33 33 34 35 3.1 Introduction 3.2 Software Development Life Cycle (SDLC) 3.2.1 Requirement planning 3.2.1.1 Image acquisition 3.2.2 User design 3.2.2.1 Image enhancement 3.2.2.2 Feature extraction 3.2.3 Construction 3.2.3.lTesting 3.2.4 Cutover 3.3 Software and hardware requirement 3.3.1 Software requirement 3.3.2 Hardware requirement 4 5 16 18 19 20 21 4.1 Required Techniques 4.2 Image Acquisition 4.3 Image Enhancement 4.3.1 RGB Format 4.3.2 Filtering 4.3.3 Threshold 4.4 Feature Extraction 36 36 37 37 37 38 39 40 IMPLEMENTATION 5.1 Introduction 5.2 Image Acquisition 5.3 Image Enhancement 5.3.1 Filtering 5.3.2 Threshold 5.4 Feature Extraction 5.4.1 Sum of Threshold Image 41 41 41 42 42 43 44 44 DESIGN x 5.4.2 Value of green 5.4.3 Estimate Maturity of Key lime 6 RESULT AND DISCUSSION 6.1 Introduction 6.2 Final Interface of the system 6.3 Test Result 6.4 Advantages and Disadvantages 6.4.1 Advantages of the system 6.4.2 Disadvantages of the system 6.5 Achieved Objective 6.6 Constraints 6.7 Assumptions and Further Research 6.7.1 Assumptions 6.7.2 Further Research 44 45 47 47 47 48 49 49 49 50 50 51 51 51 7 CONCLUSION 53 8 REFERENCES 54 9 APPENDIX A 55 xi LIST OF TABLES TABLE NO. TITLE PAGE 2.1 Key lime color descriptions 2.2 Final result of Mango grading 15 3.1 Green value according to key lime grade 29 3.2 List of software requirements 34 3.3 List of hardware requirements 35 6.1 Result from testing 48 xii LIST OF FIGURES FIGURE NO. • TITLE PAGE 2.1 Processes of tomato maturity estimator 10 2.2 Tomato storage life time 11 2.3 Formula of mean image 12 2.4 Formula of mean skin 13 2.5 Frame work of the system 13 2.6 Result of digital image processing of mango 14 2.7 Lemon measuring device 17 2.8 Formula for pixel of color index 17 2.9 Histogram of the lime 18 2.10 Flow chart Key lime export process by manual 20 2.11 Flow chart of Key lime grading by machine 21 3.1 The RAD models 24 3.2 Pre-set up hardware 25 3.3 Image of Key limes according to its grade 27 3.4 Sample user interface in Matlab 28 3.5 Labeled Key Limes according to grade 31 3.6 Healthy Key Lime at the cut session 32 3.7 Rotten Key Lime at the cut session 33 xl" 4.1 Original image of key lime 37 4.2 RGB image 38 4.3 Filtered image 38 4.4 Grayscale image 39 4.5 Binary image 39 5.1 Hardware Setup for image acquisition process 42 5.2 Source code for filtering 43 5.3 Source code for Threshold 43 5.4 Source code Sum of Threshold Image 44 5.5 Source code percentage of the green mean 45 5.6 Source code for classification of Key lime 45 6.1 GUI output of the system 47 xiv LIST OF APPENDICES APPENDIX TITLE A Result from testing PAGE 55 1 CHAPTER 1 INTRODUCTION This chapter discusses the classification of Key lime base on colour image processing briefly. This chapter contains six sub-sections: The first section discuss the background of this project. The next section describes the problem statement of this project. The third section discusses the objectives for the project. The fourth section discusses the scopes for the project. The fifth section describes the results and future benefits of the project. At last not least, sixth section contains the thesis organization. 1.1 Background Malaysia is one of developing country in ASEAN countries. Nowadays the agriculture sector plays more vital roles in Malaysia economic growth. In the Ninth Malaysia Plan (9MP) stated that "New Agriculture" will be encourage the large scale farming and increase the usage of the modern technology In the particular plan, also mentioned about the high quality production and a wide potential of biotechnology, increased concerns with information and communications technology (ICT). In the other hand, influence of information and communication technologies (ICT) in agriculture sector will upgrades the economics growth very well [1]. Generally the usage of computer technologies on agriculture sector increase the wide courage of the agriculture based industries to world and universal markets. Computer technologies supports agriculture sector by the system that user-friendly interfaces, well functioned, man power saving and cost savings. 2 In this project the Key lime (botanical name: Citrus aurantfolia) was used as the sample of the experiments. Key lime is originated from Southeast and its other names are West Indian lime, Bartender's lime, Omani lime, or Mexican lime. In Malaysia it was called as "Limau nipis". It is categorized in the citrus species with fruit in 2.5-5 cm in diameter size. In addition the fruit is yellow and green. The Key lime is very small and round in shape The Key lime a fruit that has acid but less richly flavoured then usual limes and contain less seeds. In this business era globalization, still there is no proper digital grading and classifying system for the Key lime in Malaysia. This causes major negative effects Key lime farmers and entrepreneur .Improper grading system becomes a major obstacle to our local farmers and entrepreneurs to export their yield to foreign countries. It also indirectly affects Malaysian economics because absence of classifying system causes the Key limes not to be exported to foreign country. So far, in Malaysia the Key limes are used to be classifying using manual grading method which may be incorrect sometimes. At last not least, by using image processing techniques from ICT applications can come out with a well-designed system to classify and grading the Key lime. On the other hand, this system not only increases the local farmers and entrepreneurs income it may raise our government's income by export to abroad. 1.2 Problem Statement In Malaysian agriculture field there is some specific grading system for Key lime quality. So far, the grading was conducted by manually by using human common sense. The manual grading was based on the human classification on key limes colour. If the colour, of the key lime green then it classify as grade A while its turn yellow then classify as less quality. This method affect the key limes market prices without any symptoms. This is a one of the reason that Key limes are unable to be exported to foreign country when though our country produces yield in large quantities. Grading system using a digital based system is a more needed when a yield is exporting to foreign countries. 3 There are lots of the disadvantages in the exportation or local market when the Key lime classify in manual process. The main reason is manual method consuming man power and time. This is because the farmers or entrepreneurs have to identify and classify the each key lime by manually after it's plucked from tree. In addition, the physical appearance of Key lime which is small size (2.5-5.0 cm in diameter) and round in shape causes time consuming until its takes long time to market sells. At last not least, the grading by humans can causes incorrect classification of Key lime. This is because there is no one is perfect and each human beings makes mistakes. So that, there is a high probability to the farmers and farm workers make the grading incorrectly due to their less concentration while grading by manually. Last not least, the manual grading by physical colour of the Key lime is not a universal standard accusation grading. As general facts, a natural human sight is very limited in differentiating the colours such as blue, sky blue, and violet which are lies in similar range of colour. 1.3 Objective There are some objectives to be achieves in the project: I. To develop a prototype to classify the Key lime maturity base on colour. II. To estimate the expired date of Key lime by colour. III. To identify the condition of the Key Lime. 4 1.4 Scope I. The scope of this project is owners of manufacturing factory of Key Lime and Key Lime entrepreneurs in Malaysia. II. This System will be developing in Matlab by using image processing techniques based on Key lime colour. III. The camera was placed in the 16cm distance from the Key Lime. IV. The LED lamp used to provide a constant light source to capture the Key Lime images. V. The 55 Key Lime samples were used to conduct the storage lifespan estimation experiment. VI. The size of the Key Lime considered as limitation in this project. The small sized Key Lime is not considered in this project. The diameter of the key lime should be in 3cm to 4cm. 1.5 Significance of the study This project will improves agriculture sector to increase Key lime yield. This will helps Key lime farmers and entrepreneurs' increases profits by classification grad system based on colour In addition, classified Key lime can be sell with different prices in market and may export to the foreign country. There is no any objection that the present of this system in agriculture field especially the farmers and entrepreneurs gains benefits in the way saving man power and time by the classification process. 5 1.6 Thesis Organization This thesis contains seven chapters. First chapter is introduction and its included background of the study, definition of term and problem statement. In addition, the objective, scope of study and significance of the study also be inserted in the first chapter. The background of the project discusses the basic details of Key lime. Other than that, the sub-chapter called definition of terms defines abbreviation of term that used throughout this thesis. The problem statement explains the possible problems that should be overcome in this project and the problem major crisis faced by Key lime production sector. The objective discusses the main aim of this project. On the other hand, the scope of this project discusses the main restriction conditions and required characterizes of Key lime to conduct experiments by using this system. At last not least, the significance of the study discusses the project impacts in Key lime industry. 6 CHAPTER 2 LITERATURE REVIEW This chapter two discusses the literature review on existing systems and techniques similar to classification of key lime base on colour image processing. This chapter contents five sections: The first part discuss more briefly about key lime and its benefits. The second part, elaborate the techniques on fruit colour differentiation. In the third part, it discusses the review on existing similar systems. The fourth part, briefly explain the current system and techniques in local industry. In the fifth part it introduces a latest or new system of classification of key lime to the local industry. At last not least, the conclusion holds the summary of this chapter two. 7 2.1 Introduction The Key lime (botanical name: Citrus aurantfolia) is a common lime species used in Malaysia. In Malaysia, the key lime is using in large quantity by local people for many purposes such as health, beauty concerns, medicine and etc. There are a lot of benefits from the Key lime for the consumers in many angles. The first benefits are Key lime is traditional medicine for coughing [2]. Second is Key lime plays a vital role in providing the in Vitamin C for human body. Generally, the vitamin C is an antioxidant which protects our cells from damage inflammation and keeps our immunity strong in the body [3]. In addition the Key lime also contains limonin, a compound that helps and prevents cancer in skin, mouth, stomach, lung and colon [3]. Next is Key Limes contain bioflavanoids a natural antihistamines helps humans to from the relieve allergy symptoms. It also can be used as oil controller for oily faces and blackheads remover for skins [3]. Generally, computer vision system by using image processing techniques can be used to differentiate the fruits based on colour, size, shape and texture are considered as major functions in the food industry [4]. In addition, the colour and size of the object or fruits are the very important quality of natural image. Moreover it also used be performs the vital roles in visual perception [4] .At last not least, this chapter going to discuss some existing system and there are two selected systems similar to this title which is classification of Key lime based on colour. a) Colour Grading in Tomato Maturity Estimator using Image Processing Technique [7] b) Mango Grading By Using Fuzzy Image Analysis[4] c) ARM Based Fruit Grading and Management System Using Image Processing[8] 8 2.2 Overview The colour is an important resource in process of identifies the ripening status and grade. Moreover, colour represents the maturity and ripening stage of a particular fruit or vegetable. Generally the human are responsible to identify the grades of the fruits with their naked eyes. There are some negative impact caused by human eye prediction the fruit grade based on colour such mild changes in colour of fruit, illumination, angle of sight. Therefore human facings difficulties in producing very accurate procedure for visual inspection of fruits based on colour [5]. In general, the limes dark green when ripped and when over ripped turns yellow. The nutrition contents in lime increases with it ripening stage [6].When the lime ripe fully it's bring more nutrition than under ripening stage. Basically, all limes begin with green and its turn yellow when over ripe. When the limes are fully matured its will increase in size and its external skin will be stronger [6]. At last not least, the key limes that send to international and local market should meet some requirements based on size, colour, hygienic and healthy fruits. Table 2.1 Key lime colour descriptions [13] Colour Range Description Black and green Before harvesting, unripe Dark Green Ready for harvesting, 100% green Greenish Yellow 80% Green, 20% yellow Dark Yellow 100% Green 9 2.3 Existing case study 2.3.1 Colour grading in tomato maturity estimator using image processing technique [7] This case study was conducted by W. Md. Syabrir, A. Suryanti, C. Connsynn from Faculty of Computer Science and Software Engineering, University Malaysia Pahang in year 2008. The main objective of this study is especially to improve the colour grading system of tomato in the Malaysia's tomato industry. The method discussed in this case study is improving the process of manual grading of the tomato into the Information and communication technologies (ICT). This section will discuss the method and advantages and disadvantages of the system of this case study. 2.3.1.1 Method Colour grading in tomato maturity estimator was developed by using some of the image processing techniques such as image acquisition, image enhancement and feature extraction. In figure 2.1 the flow chart of the colour grading in tomato maturity estimator using image processing technique has been shown. 10 I BEGIN I Input Image Acquisition - I i linage filtering 2. Threshold process Image Enhancement Feature Extraction '-S J I. Extract th interested colorarea Output — p- Figure 2.1 Process of tomato maturity estimator In this case study, about 50 tomatoes were used as sample in the first stage. The 50 tomato samples were had passed some particular prototype of that system that has produced output. Furthermore, particular prototypes are the image acquisition which is converting normal images into grey scale images, thresholds, filtering, and features extractions. The first step is an image acquisition. In this step the images are captured by a personal computer's camera which was placed approximately 100mm on the top of the tomato. To complete this step there is same background and same visible light condition provided. The second step is an image enhancement used to indicate the required features of interest in an image. In addition, in this system the background of the required image has been considered as noise. So that, the removing background noise is very important in this system. On the other hand, the image filtering and threshold are two types of image enhancement technique in Spatial Domain methods were practiced in this system to remove the background noise. 11 The third step was features extraction. The main purpose of this step is to get the details of the interested area in the image. For an example, a* values of the sample tomato's colour is the interested. Next is step is background removal of the influence of the image. After that, the total of a* values are gathered and totalled up. Based on the summation of total a* values used to calculate the mean of a* values. In this step, boundaries tracing, removing background and obtaining a* values are done. At last not least, the expired date of the sample tomatoes is collected based on the storage life shown in figure 2.2. Storage life: Breakers (10-20% of full maturity) ........ 21 to 28 days Turning (30-40% of full maturity) ............ 15 to 20 days Pink (50-60%of full matwity) ................ .ltol4days Light red (70 - 80% of full maturity) ....... 5 to 6 days Red (full maturity) ..................................... to4days Figure 2.2 The tomato storage life time [7] 2.3.1.2 Advantages and disadvantages of the system The prototypes used in this system are able to estimate the expiry date of the tomatoes. Even though the tomatoes are not available yet in the export market process but able to predict it early. In addition, this system is helping the tomato industry by increase the product of tomato in market. More than that, this system prototype provides a solution to the manual estimation by manpower in determining tomato maturity. At the same time it reduces errors in grading by using computer systems. 12 There are some disadvantages of colour grading in tomato maturity estimator system using image processing technique is the system programmed to estimate only one single tomato for each attempt. So that, it will consume too long time to estimate a large amount of tomatoes. It will affect the export process of these tomatoes in local or internationally. 2.3.2 Mango Grading By Using Fuzzy Image Analysis [4] This case study was conducted by the Tajul Rosli Razak, Mahmod B. Othman, Mohd Nazari bin Abu Bakar, Khairul Adilahbt Ahmad, AB Razak Mansor from Universiti Teknologi Mara (Perlis). The vital purpose of this study is on a design and development of an algorithm that detecting and sorting the mango minimum eighty percent accuracy in grading compared to human expert sorting manually. In addition, the main objectives of this study mango grading process by the fuzzy image clustering for local mango in Perlis. There are also some other objectives in this case study which are to develop fuzzy image clustering algorithm and to compare the experimental results with manual grading system by human. 2.3.2.1 Method This case study proposes a mango grading method for mangoes quality classification by using fuzzy image analysis. The algorithm used to develop the system as below. The first step is determining the size of mango by calculating the area of image mango. Secondly, detect the colour of mango by determine the mean of three colour of red, green and blue (RGB). Mean image = (Red value (Find size image) + Green value (Find size image) + Blue value (Find size image))/3 Figure 2.3 Formula of mean image 13 Third step is a process to apply edge detection algorithm. The main purpose of this step is to determine skin of image mango by calculating the mean skin. Mean skin = (edge (Red value) + edge (Green value) + edge (Blue value))/3 Figure 2.4 Formula of mean skin The fourth step is fuzzy Inference Rule to get three values of size, colour and skin to identify the grade of mango. At last not least, the final step is mango ranking based on its quality. iliar I Pocssng (MATLAB) I ----- iFar Figure 2.5 Frame work of the system 14 2.3.2.2 Result and Discussion This system was developed in Matlab by combining the digital image processing and fuzzy classification. The digital image processing in Matlab mainly used to extract the parameter of the mango which is size and colour to prepare the input for fuzzy classification. Figure 2.6 Result of digital image processing of mango The result from the digital image processing earlier was used in fuzzy logic inference in second part to get the final classification of mango based on colour and skin. The final classification result is based on the fuzzy logic inferences.
© Copyright 2024 Paperzz