INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 8, ISSUE 12, DECEMBER 2019 ISSN 2277-8616 3634 IJSTR©2019 www.ijstr.org Filtering Of Faded Coffee Beans Using Image Processing Albert John G. Gonzales, John Anthony D. Sosa, Edwin R. Arboleda, Elbert M. Galas Abstract: Faded defect coffee beans have alterations in the normal color due to iron deficiency in the soil, excessive time in the dryer, or if it is stored for a long time. The research aims to use image processing to differentiate and filter faded coffee beans from the quality coffee beans. A set of a quality coffee bean is used as a reference for color thresholding to identify which coffee bean is faded. It is then removed from the image, leaving only the quality coffee beans. The image processing done had successfully filtered out the faded coffee beans from the quality ones. Index Terms: Coffee, Image Processing, Thresholding, Faded Defect —————————— —————————— 1. INTRODUCTION One of the most valued and significant beverage in this world is coffee [1]. Better quality beverages are associated with more equilibrated sensorial attributes[2]. Coffee bean's cost relies on its quality, which directly correlates with its final product's flavor[3]. There are many factors affecting the quality of the coffee. The quality of coffee beans is traditionally determined by subjective visual inspection, which requires significant effort and time and is susceptible to error [4]. Every coffee bean sample is evaluated by its condition, appearance, and size [5]. The typical way to determine the best coffee bean is by its color. For green coffee beans, color variation is a powerful indication of the occurrence of oxidative processes and natural enzymic biochemical transformations that change the structure of the beans responsible for the flavor and fragrance of the coffee[6], [7]. Visual inspection quickly assesses the kinds of coffee beans and their quality. But human-inspectors ' decision-making capacity is subject to external factors such as fatigue, atmosphere, light, emotion, bias, etc[3]. One of the crucial points is the harvesting period, it is essential to have techniques to produce good quality coffee, the degree of coffee fruit ripeness and the prevention of mold contamination during harvesting, drying, and storing of the seeds.[8]. After picking, coffee beans are sun-dried for about 20 days and due to some external factors some of the beans might be damaged [9], [10].Another important process that affects the bean quality is the roasting, it is the chemical process consisting of heating and evaporation of moisture in the coffee that changes the color and flavor of it [11].Without proper processes, the quality of a coffee bean could decrease and ultimately be a defect. Uneven drying or re-wetting after drying, storing in bad conditions storage, long time in storage, excessive time in the dryer, or high temperature during drying, all of which can lead to a ―Faded‖ coffee bean, where it loses its color which is undesirable. By using Matlab the faded coffee bean can be identified and be separated from the good quality coffee beans. MATLAB is the simplest and widely used software in Image processing. In the Image processing algorithm, information can be extracted and also diseases can be determined, etc. It has been used in many areas, including radar systems, medical science, remote sensing, air traffic control systems, and forensic sciences [12][16]. Image processing toolbox based on MATLAB offers a broad range of referenced algorithms, techniques and apps for image processing, visualization, and segmentation. MATLAB takes each input as a matrix and performs an image-based algorithm[17][19]. MATLAB analyzes the RGB values for every pixel efficiently used for image processing [20]. It could also be used not only to discriminate against a coffee's black bean defects but also to address other color-related quality flaws [21]. RGB is the acronym for colors red, green, and blue. The resulting color is produced by these spectral components [22]. Color Thresholding is another commonly used tool in MATLAB Image processing. The color thresholding function is to separate an image into the region according to the predefined criteria [23], [24],[25]. By finding the RGB of a good quality coffee bean a comparison between the RGB values of the sampled coffee bean and the coffee beans to be tested can be done. The comparison can then determine which coffee bean is faded and which is not, and then filter the faded coffee bean out of the image, leaving only the good quality coffee beans. 2 MATERIALS AND METHODS 2.1 Review Stage The purpose of this study is to make a series of codes that will determine and filter a faded defect coffee bean to a quality one. The filtering of the faded defect coffee bean was made using color thresholding and a set of codes done in the software Matlab. Figure 1 shows an image of a set of coffee beans to be tested and filtered. The bean on the third row, the fifth column has a faded skin. The researchers aim to remove it from the image after it was analyzed, leaving only the normal ones. ———————————————— Albert John G. Gonzales is from the Department of Computer and Electronics Engineering,College of Engineering and Information Technology, Cavite State University, Indang, Cavite. John Anthony D. Sosa is from the Department of Computer and Electronics Engineering, College of Engineering and Information Technology,Cavite State University, Indang, Cavite. Edwin R. Arboleda is from the Department of Computer and Electronics Engineering, College of Engineering and Information Technology,Cavite State University, Indang, Cavite. E-mail: edwin.r.arboleda@cvsu.edu.ph Elbert M. Galas is from the Information Technology Department, College of Computing, Pangasinan State University-Urdaneta Campus