Method of Coffee Bean Defect Detection

DOI : 10.17577/IJERTV3IS20939

Download Full-Text PDF Cite this Publication

Text Only Version

Method of Coffee Bean Defect Detection

Betelihem Mesfin Ayitenfsu1

Tianjin University of Technology and Education College of Electronics Engineering,

Tianjin, China

Abstract – The purpose of this paper is to defect detection of coffee bean by image processing. Commercially the defect detection of coffee bean is done by human inspector according to the size of the coffee bean (full, half or broken). The coffee bean types and their quality are rapidly assessed through visual inspection. But the decision making capabilities of human-inspectors are subjected to external influences such as fatigue, environment, light, emotion, bias etc. With the help of image processing, we can overcome these factors and also identify any broken coffee bean. Here we discuss the various procedures used to obtain the percentage quality of coffee bean.

Keywords: Defect detection, coffee bean, Digital Image Processing, area, parameter

  1. INTRODUCTION

    inspection of grain quality. Steenhoek [4] used color features and shape feature such as area to evaluate corn damaged, Shatadal [5] used color features in the RGB (red, green, blue) images of grain to classify sample soy bean seeds damaged

    The uniformity in coffee bean size is important because it is difficult to roast large beans together with very small beans or broken beans because the smaller beans over roast or completely burn before the larger beans are roasted.

    In our research by using computers with machine vision devices and image processing technique coffee bean can be analyzed and graded based on the parameters such as metric value depend on the area and parameter of coffee bean . So in this paper, an algorithm is presented to measure some key parameters, area and metric value each coffee bean to identify the damage coffee bean compare the differences with the model parameters

    Coffee plantation is one of the most important agriculture activities to earn foreign exchange in many tropical and subtropical countries. Coffee trade plays crucial role in the

      1. Image Capture

  2. METHODOLOGY

    international commerce. The price of coffee bean depends on its quality, which has direct correlation with the taste of its final product.

    Currently, the quality detection of coffee bean relies primarily on visual inspection in business. Apart from poor efficiency, the objectivity and consistency of manual grading have some shortages. So the equipment and method are needed to detect the coffee bean automatically. [1] There have been many studies on image processing for grain quality inspection. For example, Blasco [1] developed a computer vision-based machine used color feature to inspect arils and classify it in four categories. The machine is capable of detecting and removing unwanted material and sorting

    The arils by color. Pearson [2] developed a low-cost line scan imaging system was developed to inspect and sort grains and other products at high speeds (40kernels/s). The device captures bi-chromatic images from opposite sides of each kernel and processes the images in real time using high-speed microcontrollers. Wan [3] developed an automatic kernel (rice, wheat, Jobstear, and sorghum) handling unit, consisting of an automatic inspection machine and an imageprocessing for machine vision

    A digital camera model DSC-H10, SONY 8.1 Mega Pixel, was used to record coffee bean images. When images were taken, the camera was mounted on a stand which provides easy vertical movement and stable support for the camera. Digital camera of high pixel resolution rate can also be used to collect image data the camera should be placed at a location situated with a plane normal to the objects path. The black background was used. The environment was controlled to improve the data collection with simple plain background. The images acquired were 3264×2448 pixels in size. Images were captured and stored in JPG format automatically. Through data cable these images has been transferred and then stored in disk.

    1. (b)

      Fig. 1 Captured Image

        1. Image Processing

      Image processing is any form of signals processing for which the input is an image, such as a photograph or video frame; the output of image processing may be either an image or a set of Characteristics or parameters related to the image. Most image-processing techniques involve treating the image as a two-dimensional signal and applying standard signal-processing techniques to it.

      Main goal of this project is to classify defect coffee bean based on their roundness, area and parameter using bwboundaries, a boundary tracing routine in MATLAB. Following are the steps involved in identifying broken coffee bean On the first step we read the image of coffee bean by using imread function. Convert RGB color image to binary image in order to prepare for boundary tracing. First RGB image is converted to grayscale image using function rgb2gray convert this grayscale image to binary image (Black and white).

      This is done by using function im2bw (I, level). The output image replaces all pixels in the input image with luminance greater than level with the value 1(white) and replaces all other pixels with the value 0(black). Specify level in the range [0,1]. This range is relative to the signal levels possible for the image's class. Therefore, a level of

      0.5 midway between black and white, regardless of class. To compute the level argument, we can use the function gray thresh. If we do not specify level, im2bw uses the value of 0.5 and by using morphology functions, remove pixels which do not belong to the objects of interest. Morphology is a broad set of image processing operations that process images based on shapes.

        1. Morphological Features

          Morphological features are the geometric property of an image like shape and size. They are physical dimensional measures that characterize the appearance of an object. For instance, area and perimeter are some of the most commonly measured size features and similarly circularity

          P is circular, its compactness will be equal to 1. However, if the space is a very thin and long bar, its compactness will be close to 0.

          Morphological operations apply a structuring element to an input image, creating an output image of the same size. In a morphological operation, the value of each pixel in the output image is based on a comparison of the corresponding pixel in the input image with its neighbors. By choosing the size and shape of the neighborhood, you can construct a morphological operation that is sensitive to specific shapes in the input image. Remove all objects containing fewer than 30 pixels. Fill Trace region boundaries in binary image using function bwboundaries in binary image using function bwboundaries

        2. Defect Detection

      Estimate each coffee bean area and perimeter. Use these results to form a simple metric indicating the roundness of a coffee bean

      (1)

      Use the formula in the word to edit the above formula This metric is greater than or equal to 0.65 only good coffee bean and it is less than 0.65 for damaged coffee bean. The discrimination process can be controlled by setting an appropriate threshold. In this research use a threshold of

      0.65 so that only the pills will be classified as damaged coffee bean. Use region props to obtain estimates of the area for all of the objects. Notice that the label matrix re Turned by boundaries can be reused by regionprops

      Metrics above 0.65 indicate that the coffee bean is good

      measures he shape of image compactness

      Figure 2 shows an example for a 2×2 pixel square of a binary image. The object area is A=4 and the object perimeter is P=8. The circularity is 0.79 by using the above formulas. The gray color indicates the boundary of the image, which is the perimeter of the image and the black

      0.65

      0.44

      0.69

      0.77

      0.53

      0.63 0.805.82

      0.75

      0.82

      0.73

      region or the pixel values of 1, indicates the area of the object.

      0.68

      0.82 0.65

      0.640.84

      0.650.63

      0.65

      0.72

      0.78

      0.85

      0.38

      0.44

      0

      0

      0

      0

      0

      1

      1

      0

      0

      1

      1

      0

      0

      0

      0

      0

      0.52

      0.68

      0.79

      0.49

      0.58

      0.78

      Fig 2 : Example of Perimeter and Area Computation

      Fig 3. Determine which coffee bean are defect

  3. PROGRESS OF THIS STUDY

In this study research, three quality parameters could extract successfully from green coffee bean image. Statistical method used to analyze the three quality parameters.

Image processing could classify the sample into 2 criteria. From 100 sample of coffee bean 78.32% good and 19.68% of coffee bean damaged and 2 % wrong detection .

Result as shown Fig. 3 detecting the defect of coffee bean. We can see clearly that the health coffee bean dont have hole and broken coffee bean shows black hole .Now if we divide the number of coffee bean from the image coffee bean are broken defected according to the threshold value .We can achieve the percentage purity of the given sample .

Here we conclude that detecting of coffee bean is by using the image processing techniques. With our coding we can calculate that how pure is our sample. The setup used is also very common and easily available. This is also more accurate than the human visual inspection. All this leads to better quality in coffee bean processing by image processin

REFERENCE

  1. J. Blasco, S. Cubero, J. Gómez-Sanchís, P. Mira, and E. Moltó, Development of a Machine for the Automatic Sorting of Pomegranate (Punica Granatum) Arils Based on Computer Vision, Journal of Food Engineering 90 (2009) 2734.

  2. Pearson TC, Low-cost Bi-Chromatic Image Sorting Device for Grains, ASABE Annual International Meeting, Paper Number: 063085, 2006.

  3. Wan YN, Kernel Handling Performance of an Automatic Grain Quality Inspection System, Vol. 45(2): 369377, 2002, Food & Process Engineering Institute of ASAE, Transactions of the ASAE.

  4. Steenhoek LW, M. K. Misra, C. R. Hurburgh Jr., C. J. Bern,

    Implementing a Computer Vision System for Corn Kernel Damage Evaluation, Applied Engineering in Agriculture, Vol. 17(2): 235 240, 2001, American Society of Agricultural Engineers

  5. Aksoy MA, Beghin JC. Global Agricultural Trade and Developing Countries. Washington DC: TheWorld Bank. 2005: 298-303.

  6. International Coffee Organization. Trade Statistics of Total Production of Exporting Contrary www.ico.org. July 2011.

  7. Mulato S. Pengolahan Produk Primer dan Sekunder Kopi (Primer and Secunder Coffee Product Processing). Jember: Pusat Penelitian Kopi dan Food & Process Engineering Institute of ASAE, Transactions of the ASAE

  8. B. S. Anami, D. G. Savakar,Improved Method for Identification and Classification of Foreign Bodies Mixed Food Grains Image Samples 2005

  9. N.S. Visen, J. Paliwal, D.S. Jayas and N.D.G. White Image Analysis of bulk grain samples using neural networks 2004

  10. Agustin, O.C., Byung-Joo Oh, Automatic Milled Rice Quality Analysis, Future Generation Communication and Networking,2008.

  11. S. Anami1, D. G. Savakar, Improved Method for Identification and Classification of Foreign Bodies Mixed Food Grains Image Samples 1K. L. E. Institute of Technology.Hubli- 580030,.Indiaanami_basu@hotmail.com, ICGST-AIML Journal, ISSN: 1687- 4846, Volume 9, Issue I, February 2009

  12. Faridah*1, Gea O. F. Parikesit2, Ferdiansjap Coffee Bean Grade Determination Based on Image Parameter Department of Physic Engineering, Faculty of Engineering, Universitas Gadjah Mada Jalan Grafika 2 Yogyakarta, Indonesia

    e-mail: faridah@ugm.ac.id1, gea_ofp@yahoo.com2, ferdiansjah@ugm.ac.id

  13. William K. Pratt: Digital image processing, PIKS Scientific inside, John Wiley, 4th Edition , 2007

Leave a Reply