0% found this document useful (0 votes)
45 views7 pages

Rice Grain Classification via Image Processing

This document discusses classifying four varieties of rice grains using image processing techniques. It presents a system that captures images of rice grain samples containing mixtures of different grain varieties. The samples are preprocessed to remove noise before segmentation. Segmentation is performed by filtering grains based on RGB color channel ranges to separate red and white grains. The system then analyzes features like grain color and shape to classify and count the different varieties in each sample and determine purity percentages.

Uploaded by

chinna chinna
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views7 pages

Rice Grain Classification via Image Processing

This document discusses classifying four varieties of rice grains using image processing techniques. It presents a system that captures images of rice grain samples containing mixtures of different grain varieties. The samples are preprocessed to remove noise before segmentation. Segmentation is performed by filtering grains based on RGB color channel ranges to separate red and white grains. The system then analyzes features like grain color and shape to classify and count the different varieties in each sample and determine purity percentages.

Uploaded by

chinna chinna
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

See discussions, stats, and author profiles for this publication at: [Link]

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@[Link], wrmel@[Link]

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)
[Link]
(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 [Link]
Quality Using Pattern Classification. 8/[Link] (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

Common questions

Powered by AI

Image preprocessing steps enhance histograms by removing noise, which otherwise obscures the intensity values crucial for segmentation. When the image is preprocessed, it corrects lighting and removes impurities, leading to clearer and more distinguishable intensity value distributions within the histogram. This clarity helps improve the analysis by providing a cleaner representation of pixel intensity without the interference of extraneous noise, making segmentation more effective . Preprocessing allows for a smoother transition within histograms, thus facilitating easier segmentation and classification .

The machine vision system classifies different varieties of rice by analyzing digital images and videos, distinguishing grains based on color and size . Grains are classified according to color using the RGB model, where each pixel is analyzed for red, green, and blue color values . Specifically, the RGB channels have defined value ranges that are used to separate red and white grains. For example, RGB values for Red Basmati and Red Samba are within specified ranges, and similar ranges are defined for White Basmati and White Samba . Additionally, a black background helps in filtering the grains and achieving accurate segmentation, facilitating the differentiation of mixed grains in the sample .

Preprocessing plays a critical role in improving the accuracy of rice grain classification by eliminating noise from images, which enhances the segmentation process. Before any algorithm development, preprocessing operations ensure the noise is removed, thereby simplifying histograms that represent intensity values in images . For instance, images are preprocessed to correct lighting conditions and remove impurities, which aids in more accurate classification based on color and other features . This step is crucial because noise in images makes it difficult to use them directly for reliable segmentation and classification .

The RGB channel value ranges are pivotal in classifying red and white rice grains as they define the specific thresholds for each color channel that differentiate grain types. For red grains like Red Samba and Red Basmati, specific ranges are set for the red, green, and blue channels, such as 85 < s(x, y, 0) < 160 for the red channel . Similarly, White Samba and White Basmati grains have their unique value ranges, such as 123 < s(x, y, 0) < 184 for the red channel . These predefined value ranges allow the system to segment and classify grains accurately by comparing each pixel's RGB values within the image .

Digital images form the cornerstone of the machine vision system for rice grain classification as they provide the primary data input for analysis and segmentation. The system analyzes these digital images to identify distinct grain features such as color, shape, and size, essential for classification. The clear resolution and ability to capture details in various lighting conditions make digital images vital for accurate processing and differentiation of varying grain types within the system .

A black background is used during the rice grain classification process to enhance the visibility and distinguishability of the grains against the background, aiding in accurate segmentation and analysis. The contrast between the grains and the black background allows the system to better differentiate between the grains' edges and colors, thus improving the overall accuracy of the classification system by facilitating clearer visual separation of the samples .

You might also like