Rice Grains Classification Using Image Processing Technics: December 2016

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/311373270

RICE GRAINS CLASSIFICATION USING IMAGE PROCESSING TECHNICS

Article · December 2016

CITATIONS READS

18 10,764

1 author:

Kasun Herath
The Open University of Sri Lanka
20 PUBLICATIONS   34 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Understanding the Hand Gesture Command to Visual Attention Model for Mobile Robot Navigation: Service Robots in Domestic Environment View project

All content following this page was uploaded by Kasun Herath on 02 January 2017.

The user has requested enhancement of the downloaded file.


RICE GRAINS CLASSIFICATION USING
IMAGE PROCESSING TECHNICS
Herath H.M.K.K.M.B and Eng. de Mel W.R
Department of Mechanical Engineering, The Open University of Sri Lanka,
Nawala Nugegoda, Sri Lanka.
kasunherathlive@gmail.com, wrmel@ou.ac.lk

ABSTRACT countries (approximately 1000 MT) and


global rice demand is increase by 1.95%
Rice is main food crops that all human annually.
consumes in all over the world, especially in
Asian countries. It is primarily classified As the technology is growing, industries and
according to its grain shape, color etc. This peoples are adaptive to new technologies
paper presents the use of machine vision rather than using old techniques. More people
system for the grain classification. Machine consume the rice as food, so demand is
vision has been used in a most application of increasing. This is the reason why rice is
grain classification to differentiate rice bagging and packaging becoming automated.
varieties based on special features such as In the present grain-handling system, grain
shape, length, chalkiness, color and internal type and quality are rapidly assessed by visual
damage of rice. RGB color model, histogram, inspection [2].
edge detection are some ways which have
been used to differentiate and analyzed the The purpose of the image processing
rice grains. In this paper also discussing and techniques is testing the quality of the rice
suggesting methods classify four varieties of grain. The quality of the rice grain is based on
rice and it also finds the percentage of purity the several parameters. Such as grain color,
of rice grains using the image processing shape, and the size. Fragments of the grain are
technics based on several features such as highly effective to the quality of the rice.
grain color and shape. Machine vision systems are used to identify
Keywords: Grain classification, image the quality of the grain. Digital images and
processing, MATLAB techniques, canny videos are the key sources of the machine
algorithm vision systems. When the grains are mixing
together machine vision system needs to
identify contains the grains mixture. In here
grains are classified according to its color and
1. INTRODUCTION
the size. This paper introduces how to filter
Rice is single most important food in the and classify four types of rice in a grain
Asian countries, especially in Sri Lanka. mixture. To achieve the good results black
Averagely 37% of cultivation is occupied by background was used. The basic operation of
the total cultivation in Sri Lanka [1]. For the the system represents in Figure 01(Block
global demand, rice is exportation to the other diagram).

1
Figure 01 : Basic building block for system operation

2. MATERIALS AND METHODS

Rice sample A and B represents the four in together. Both samples are comprised of
varieties of rice grains (Red Basmati, White different color and different shapes of grains.
Basmati, Red Samba and White Samba) mix

B1-R Red Basmati

B2-W White Basmati


B1-R B2-W
S1-R Red Samba

S2-W White Samba

Table 01 : Grain varieties


S1-R S2-W

Grain Sample A:

Type Count Percentage


B1-R 6 14.28%
B2-W 10 23.80%
S1-R 15 35.71%
S2-W 11 26.19%
Table 02 : (Grain Count for sample A)

Figure 02 : Sample A

Grain samples were scattered on a plate which images acquired were 2113×2177 pixel size
is 14.5cm wide and 7.5cm heights. In order to and the image was taken by using the 8
eliminate the shadow, a black mat polymer megapixels with 1.5µ pixels Digital camera.
sheet was attached to the bottom of the inner Then the image was transformed to a
surface of the plate. Grains were separated computer (i5 6th Gen processor, 8GB RAM)
manually to eliminate grain contact. The for subsequent analysis [4].

2
It is necessary to eliminate the noise from the followed in MATLAB. By compositing the
image before beginning of the algorithm red, green and blue channels to create the
development. Preprocessing operations will color image and the result of above
help to remove noise from the image. As the preprocessing steps are shown in Figure 03.
preprocessing operation following steps were

Figure 03: Preprocessing operation

Figure 04 : Before preprocessed Figure 05: After Preprocessed

Sample-A contains the 50% of red color also uses to improve the visual appearance
rice grains and 50% of white color rice of an image. After removing noise from
grains. The grain samples were cleaned the original image the histogram also can
from impurities and subjected to the be simplified and easy to analyze. Figure
standardized lighting condition. Each 06 represents the frequency of each
image taken by this imaging system intensity values but with the noise. This is
contains 40 - 150 grains. Samples also very hard to use for the segmentation
comprise with the damaged and discolored process in the machine vision system. In
grains. order to increase an accuracy of the
results, preprocessed image is used for the
Histograms represent the frequency of segmentation (Figure 05).
each intensity value occurs in an image. It

3
Figure 06 : Histogram of the Image Sample A (Befor preprocess)

Figure 07 : Histogram of the Image Sample A (After preprocess)

2.1 GRAINS SEGMENTATION BY color by using minimum and maximum value


COLOR range of the red, green and blue channels.
Each s(x, y, n) value for the R, G and B
A digital color picture consists of pixels which channels can be defined as,
are represented as a vector of three color
values [6]. R = s(x, y, 0)
Mathematically image can be describe by G = s(x, y, 1)
equation, B = s(x, y, 2)

S = s(x, y, n)
In a digital 24-bit RGB picture, the values of
Parameter n is represent the color channel of each channel should be,
the image, where n = {0, 1, 2, … (N −1)}
0 < s(x, y, 0), s(x, y, 1), s(x, y, 2) < 255
In this machine vision system used the RGB In order to filter the red color grains and white
color image which has three channels for the color grains, machine vision system need to
particular color red, green and blue. The identify the RGB channel’s value ranges for
grains were separated according to the grains the red grains and white grains.

4
85 < s(x, y, 0) < 160
34 < s(x, y, 1) < 144
15 < s(x, y, 2) < 126

Red Samba and red Basmati


grains RGB range

Figure 08 : RGB value range for RED color grains

123 < s(x, y, 0) < 184


127 < s(x, y, 1) < 189
128 < s(x, y, 2) < 190

White Samba and white


Basmati grains RGB
range

Figure 09 : RGB value range for WHITE color grains

2.1.1 Red color grains separating 2.1.2 White color grains


process separating process

Figure 10 : Red color grains Figure 11 : White color grains

Grain Real Image Accuracy Grain Real Image Accuracy


Color count processing Color count processing
count count
Red 21 21 100% White 21 21 100%

Table 03: Image processing data for red Table 04: Image processing data for white
grains grains

5
REFERENCES

[1] User, S. (2016) Ministry of Academy of Sciences. (Arefi*, Motlagh,


Agriculture. Available at: and Teimourlou, 2011, pp. 319–325)
http://www.doa.gov.lk/index.php
(Accessed: 7 October 2016). [5] Guzman, J.D. and Peralta, E.K.
Classification of Philippine rice grains
[2] Gujjar, H.S. and Siddappa, D.M. using machine vision and artificial
(2013) A Method for Identification of neural networks. Available at:
Basmati Rice grain of India and Its http://www.cabi.org/gara/fulltextpdf/200
Quality Using Pattern Classification. 8/20083298085.pdf (Accessed: 7
Vol. 3, Issue 1 edn. (Gujjar and October 2016).
Siddappa, 2013, pp. 268–273)
[6] Boehnke, K., Otesteanu, M.,
[3] Kiruthika, R., Muruganand, S. and Roebrock, P., Winkler, W. and
Periasamy, A. (2013) ‘MATCHING OF Neddermeyer, W. (2007) ‘neural
DIFFERENT RICE GRAINS USING network based object recognition using
DIGITAL IMAGE color block matching’, innsbruck,
PROCESSING’, International Journal austria: pp. 122–125.
of Advanced Research in Electrical,
Electronics and Instrumentation
Engineering, Vol. 2(2278 – 8875), pp.
2937–2941.

[4] Arefi*, A., Motlagh, A.M. and


Teimourlou, R.F. (2011) Wheat class
identification using computer vision
system and artificial neural networks.
Institute of Agrophysics, Polish

View publication stats

You might also like