0% found this document useful (0 votes)
86 views

Quality Analysis and Classification of Rice Using Image Processing

Grain quality analysis is a huge challenge in agricultural industries. Internal control is critical in the food industry because food products are characterized and rated into various categories after quality data has been collected. Grain quality assessment is performed by hand, but the results are subjective, lengthy, and pricey.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views

Quality Analysis and Classification of Rice Using Image Processing

Grain quality analysis is a huge challenge in agricultural industries. Internal control is critical in the food industry because food products are characterized and rated into various categories after quality data has been collected. Grain quality assessment is performed by hand, but the results are subjective, lengthy, and pricey.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

10 VI June 2022

https://doi.org/10.22214/ijraset.2022.44227
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

Quality Analysis and Classification of Rice using


Image processing
Chityala Udhay1, Rishabh Semwal2, Krishna Goel3, G. Ravi4
1, 2, 3
Students of Department of Computer Science and Engineering, Sreenidhi Institute of Science and Technology, Hyderabad
4
Associate Professor, Department of Computer Science and Engineering, Sreenidhi Institute of Science andTechnology, Hyderabad

Abstract: Grain quality analysis is a huge challenge in agricultural industries. Internal control is critical in the food industry
because food products are characterized and rated into various categories after quality data has been collected. Grain quality
assessment is performed by hand, but the results are subjective, lengthy, and pricey. To overcome the limitations and drawbacks
of image processing techniques, different resolutions are used for grain quality analysis. Using image processing techniques,
this paper proposes a method for grading and analyzing rice based on grain size and form. An edge detection algorithmic
software is used in particular to determine the area of each grain's borders. we discover the endpoints of each grain using this
technique, and we can then live the grain's endpoints using caliper.
Keywords: Grain quality, rice characteristics, image acquisition, image processing and analysis, grain evaluation, etc.

I. INTRODUCTION
Agricultural enterprise is the oldest and maximum huge enterprise withinside the world. Traditionally, the first-class of meals are
described via way of means of a human sensory panel primarily based totally on its bodily and chemical properties. Physical
parameters encompass grain length and form, moisture content material, chalk, whiteness, and freeness. For the top-of-line storage,
the moisture content material needed to be among 12-14%. Various techniques are used for moisture evaluation.
The primary goal of the proposed method is to provide an alternative approach to quality analysis that requires less time and money.
Image processing is an important and advanced technological subject that has seen significant progress. Attempts are being made to
replace human manual detection. The document suggests a solution to agribusiness problems.

II. PROBLEM DEFINITION


Product quality analysis is critical in the agriculture sector. An experienced technician visually evaluates the quality of the grain
seed. However, the outcome of such an assessment is comparative, varies in results, and takes a long time. The technician's attitude
also has an impact on quality; as a result, a new and improved methodology, namely an image processing technique, is presented to
address the flaws that have evolved as a result of old ways.

A. Quality and Classification


Grain quality assessment is a significant concern in agriculture. In the food sector, quality control is critical since food is categorized
and divided into several classes based on quality factors after harvesting. Grain quality testing is manual, but it is subjective, time-
consuming, and expensive. Using image processing techniques, the research provides a method for classifying and grading grains
based on grain size and form. Specifically, edge detection to determine each grain's border. We may determine the endpoints of each
grain using this technique, and then measure the length and width of the rice using vernier calipers. This process takes very little
time and is very affordable.
The image processing technology is used to count the number of rice and classify them based on length, breadth, and length-breadth
ratio. The length-width ratio is calculated as follows: length equals the average length of the rice grain, and breadth equals the
average breadth of the rice grain.

L/B = [(average rice length) / (average rice breadth)] *100

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2002
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

B. Image Acquisition and Processing


A camera is used to capture the image. This is depicted in Figure 1. On the computer, the captured image is saved. Image processing
methods are applied to the image after it has been saved.

Fig.1 Original Image

III. METHODS
Fig. 2 depicts the flow of the image processing method, which consists of a few basic phases. For image acquisition, rice grains are
scattered at random on a black background. The image is saved to be analyzed later. The first phase is pre-processing, which
involves image registration and noise removal via a filter. The Shrinkage algorithm is used to segment the touching kernels in the
second stage. We have a tendency to use edge detection in the third stage to find the boundary region. The rice grain measurement,
as well as length, breadth, and length-breadth measurements, are completed in the fourth stage. Rice is categorized in the fifth stage
of the algorithm based on its size and form.

Fig.2 Flow Diagram for Image Processing Algorithm


A. Image Pre-processing
The image acquired with a camera is saved in the computer's 3-D RGB color space, as seen in fig 1. The filter is used to remove
noise that happens during the image acquisition process. The image is also sharpened by the filter. The rice grains are segmented
from the black background using a threshold technique, and the image is converted to a grey image as seen in fig 3.

Fig3. Grayscale image

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2003
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

B. Shrinkage Morphological Operation


Rice grains are scattered randomly across a black background. The grains in Figure 1 are not oriented in any way. When contacting
grains occur, morphological operations can be used to categorize them. Grain touching can be separated into two types: point and
line touching. The combination of dilatation and erosion is a morphological surgery. Erosion is a technique for separating adjacent
parts of a grain of rice without compromising its integrity. The erosion process is followed by the dilation process. The purpose of
dilatation is to restore the original shape of degraded features without re-joining the divided elements.

In the vision and motion toolbox, there are different types of morphological operations are available such as;
1) Auto M - Auto median,
2) Close - Dilation followed by an erosion,
3) Dilate - Dilation (opposite of erosion),
4) Erode - Erosion which removes isolated background pixels,
5) Open - Erosion followed by dilation,
6) P close - A succession of seven closings and openings,
7) P open - A succession of seven openings and closings.

Fig4. Erosion form of image

Fig5. Dilation form of image

C. Edge Detection
As illustrated in Fig.6, edge detection aids in locating the region of rice grain boundaries. Gaussian, Gradient, Prewitt, Canny,
Fuzzy, and Sobel are six edge detection algorithms offered in Vision and Motion Toolbox. In the proposed methodology, we use the
Sobel method to find edges.

Fig6. Erosion form if the image

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2004
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

D. Object Measurement
The number of grains of rice in the image represents the number of individual grains in the evaluation. After counting the number of
grains of rice, edge detection techniques are implemented to the image, and endpoint values for each grain are obtained as a result of
the algorithm's application. We use a caliper to connect the endpoints and evaluate the length and breadth of every grain. Once we
have the length and breadth values, we can calculate the length to breadth ratio.

E. Object Classification
All outcomes must be standard, measured, and calculated to be classified. The laboratory manual on rice grain quality, Board of
Rice analysis, Rajendranagar, Hyderabad, provides the standard information for measuring the size and form of rice.

The table below shows how rice grains are classified based on the length and length-to-breadth ratio:

Table1. Classification Based ON The L/B Ratio

IV. RESULT AND DISCUSSION


Table 4 shows the results obtained from putting image processing algorithms into action. The length-breadth ratio of each grain in
the input image is shown in the result.

S.no Grain Number L/B ratio Label


1 Grain 1 1.29 Bold
2 Grain 2 2 Bold
3 Grain 3 1.29 Bold
4 Grain 4 1.62 Bold
5 Grain 5 1.78 Bold
6 Grain 6 2.14 Medium
7 Grain 7 1.5 Bold
8 Grain 8 1 Round
9 Grain 9 1.23 Bold
10 Grain 10 1.25 Bold
11 Grain 11 1.92 Bold
12 Grain 12 1.11 Bold
13 Grain 13 1.73 Bold
14 Grain 14 1.54 Bold
15 Grain 15 2 Bold
16 Grain 16 1.25 Bold
17 Grain 17 1.52 Bold
18 Grain 18 2.2 Medium
19 Grain 19 1.13 Bold
20 Grain 20 1 Round
21 Grain 21 3.33 Slender
22 Grain 22 1.91 Bold

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2005
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

23 Grain 23 2.1 Medium


24 Grain 24 1.33 Bold
25 Grain 25 1.62 Bold
26 Grain 26 1.06 Bold
27 Grain 27 1.36 Bold
28 Grain 28 1.08 Bold
29 Grain 29 3.67 Dust
30 Grain 30 1.27 Bold
31 Grain 31 1.2 Bold
32 Grain 32 1.33 Bold
33 Grain 33 1.43 Bold
34 Grain 34 1.23 Bold
35 Grain 35 1.43 Bold
36 Grain 36 1.58 Bold
37 Grain 37 1.36 Bold
38 Grain 38 1.7 Bold
39 Grain 39 1.23 Bold
40 Grain 40 1.18 Bold
41 Grain 41 2 Bold
42 Grain 42 1.33 Bold
43 Grain 43 2.33 Medium
44 Grain 44 2.4 Medium
45 Grain 45 1.29 Bold
46 Grain 46 1.22 Bold
47 Grain 47 1.55 Bold
48 Grain 48 2.86 Medium
49 Grain 49 2.1 Medium
50 Grain 50 1.88 Bold
51 Grain 51 4 Dust
52 Grain 52 1.2 Bold
Table2. Results for L/B Ratio

Images in which rice grains are randomly arranged and dispersed in a layer are subjected to image analysis techniques. When a fault
occurs, such as touching kernels, the shrinking process effectively separates the connecting section from the points where the
kernels are touching. Edge detection is used to determine the range of each grain's boundaries and endpoints, after which the length
and width can be measured with a caliper. The length-breadth ratio is calculated when the length and breadth values have been
determined. A dash app is created to see the results of the Average aspect Ratio Vs Classification chart and a pie chart for Quality
analysis of the input image.

Fig7. Grouped Bar chart - Avg. Aspect Ratio VS Classification

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2006
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

Grouped Bar chart – Used for Classification purposes


 Blue Bar indicates the Number of Rice grains.
 Red Bar indicates Average Aspect Ratio.

fig8. Pie chart – Quality Analysis


Pie chart – Used for Quality Analysis purposes
 Blue Section indicates the percentage of Rice grains in the given sample.
 Red Section indicates the percentage of Dust in the given sample.

V. CONCLUSION
In this project, we classify the taken rice grain sample into different categories and also analyze its quality based on the aspect ratio,
so comparison with other works is not possible. Existing work only detects the rice grains or calculates the number of rice grains in
the given sample, but our work helps analyze the quality of the rice sample and place it into a specific category. The quality of the
grains in the samples is nearly 100% accurate and capable of efficiently classifying high-value grains, which is otherwise very time-
consuming in manual analysis. This function can save a lot of time and manpower.

VI. FUTURE WORK


The majority of quality analysis factors must be measured using image processing techniques. This research could be expanded to
develop a method for identifying granules based on any attribute that can be used to improve rice quality. The cost of such a system
should be low, as should the time spent on quality analysis.

REFERENCES
[1] “Laboratory Manual on Rice Grain Quality”, Directorate of Rice Research, Rajendranagar, Hyderabad, September 2013.
[2] Mahale, Bhagyashree, and Sapana Korde. "Rice quality analysis using image processing techniques." International Conference for Convergence for
Technology-2014. IEEE, 2014.
[3] Ali, S.F., Jamil, H., Jamil, R., Torij, I. and Naz, S., 2017, November. “Lowcost solution for rice quality analysis using morphological parameters and its
comparison with standard measurements”. In 2017 International Multi-topic Conference (INMIC) (pp. 1-6). IEEE.
[4] “Documentation Python”. Online: https://www.python.org/doc/
[5] “Documentation Open CV”. Online: https://opencv.org/about/
[6] IBPGR-IRRI Rice Advisory Committee, “Descriptors for Rice Oryza Sativa L”. International Rice Research Institute and International Board for Plant Genetic
Resources, 2020.
[7] Divya Mohan, M.Raj., Semanticscholar 2016, ”Quality Analysis of rice grain using ANN and SVM”.

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2007

You might also like