International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 08 Issue: 03 | Mar 2021 www.irjet.net p-ISSN: 2395-0072
Quick Analysis of Quality of Cereals, Oilseeds and Pulses
Siddhant Ghule1, Amit Thakur 2, Sidhodhan Kamble 3
1UG, Department of Instrumentation and Control Engg, Vishwakarma Institute of Technology, Pune,
Maharashtra, India.
2,3 UG, Department of Instrumentation and Control Engg, Vishwakarma Institute of Technology, Pune,
Maharashtra, India.
ABSTRACT
Quality and purity checking of grains are commonly derived from human vision observation. Analysing the grain sample
manually is a longer consuming and sophisticated process, and having more chances of errors with the subjectivity of
human perception. Laborious techniques such as manual measurement of individual seeds variation in quality results. To
overcome these, we developed image processing-based techniques to analyse the quality of cereals, oilseeds and pulses. The
structural analysis that is outer part analysis is important in checking the quality of grains. The structural analysis covers
the visualization aspect like measurement of size (length, width), colour, glossiness and aspect ratio and it also should be
barren of shrivelled, diseased mottled, molded, discoloured, damaged and empty seeds. Computer vision and machine
learning provides one alternative for an automated, speedy analysis and cost-effective technique to accomplish these
requirements over other conventional techniques.
Keywords: Computer vision, Image processing, Kernel, Grains, Contour, CNN.
1.INTRODUCTION grains. The structural study covers parameters like size
means length and width measurement, colour and
Cereal grains vitally important in meeting the nutrient glossiness checking, aspect ratio. Structural study is done
needs of the human population. Cereals are an upscale either by human or image-based analysis. Detailed
source of vitamins, minerals, carbohydrates, fats, oils, and measurement of grain shape such as length and width
protein. Legumes are an important source of protein, commonly depend on laborious techniques such as
dietary fibre, carbohydrates and dietary minerals. manual measurement of single grains. Manual analysis of
Oilseeds are wont to make vegetable oils and biodiesel. grains is done either by eyes or using measuring
Grain quality can have different aims to different people instruments. Manual measurement doesn’t guarantee
depending upon the sort of grain or seed and its intended quality. The results of the analysis may differ if the
use. Sometimes the lesser quality grain is mixed with samples to be analysed are more numerous. For
superior quality grain to urge a far better price. the measuring individual nucleus parameters, image analysis
merchandise made up of this sort of mixture can cause and machine learning techniques have proven to be a
bad quality foods. this sort of adultery essential to be very efficient solution. Compared to analysing the
recognized while the choice of cereals, oilseeds and samples by visual observation, the instrument
pulses. Consumer preferences affect what people buy measurement has more accurate results.
then affect market prices. Therefore, it requires a Our objective is to develop an image processing-based
different quiet grain analyser which may provide analysis model to check quality of cereals, oilseeds and pulses by
to satisfy the market needs. Grain form is evaluated with structural analysis i.e., size (height and width), colour and
length, width, and thus the magnitude relation of length glossiness. By checking quality, the aim is to analyse
and dimension of rice grains. The effectiveness and market needs as well as consumer preferences and get
accuracy of inspections are improved through these better prices, remove impurities and foreign matter,
strategies. detect adulteration.
Grain quality depends on individual kernel features.
Kernel’s features can be measured by either 2. LITERATURE SURVEY
compositional analysis or structural analysis. The This review presents the recent developments and
structural study of grains targets the exterior part of applications of image analysis within the food business,
© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 848
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 08 Issue: 03 | Mar 2021 www.irjet.net p-ISSN: 2395-0072
the fundamental ideas and technologies related to laptop
vision. Image process is recognized as being the core of
laptop vision with the event of additional economical
algorithms aiding within the larger implementation of
this system. The machine-controlled, objective, fast and
hygienical scrutiny of various raw and processed foods is
achieved by the utilization of laptop vision systems.
Computer vision has the potential to become a significant
part of machine-controlled food process operations as
exaggerated laptop capabilities and larger process speed
of algorithms are regularly developing to fulfil the
mandatory on-line speeds. The flexibleness and non-
destructive nature of this system conjointly facilitate to
take care of its attractiveness for application within the
food business.
There are a variety of ordinary procedures for seed
quality analysis and sorting that are principally
supported the assessment of varied physical,
morphological and physiological properties of seeds
however in recent past, a powerful would like was felt for
the event of additional correct, fast and non-destructive
strategies of seed quality analysis. Machine vision or
processed image analysis system is found to be terribly 3.1 Size and Aspect Ratio –
convenient technique for seed connected studies because
it is free from human errors, additional fast and provides 3.1.1 Size –
shut analysis of seeds and germinating seedlings. Image segmentation was processed using SPYDER
software by changing a true color RGB image to a
3. METHODOLOGY grayscale image. Then Gaussian blur is applied to the
grey-scale image. Basically, a grayscale image is used to
Kidney Beans and two varieties of rice (Basmati and increase quickness and accuracy. Then by applying canny
Indrayani) were used in the study. Both Kidney Beans edge detection, edges get to find out. It is used to detect
and rice have different varieties in terms of structural multiple objects. With the help of a Canny edge detector,
analysis. The differences between Kidney Beans Grains the converted image will be processed and it scans the
and two rice variety grain samples were important to entire image. Thenceforth, execute the dilation and
evaluate the effectiveness of the method through the erosion method to close holes between edges in the edge
grow-out test. frame. The reference object is placed on the left most
A total of 500-grain samples of Kidney Beans and two corner of every image. After that contours were drawn
rice varieties were used for image analysis. Images are for reference objects and for individual grains and by
captured using a camera and all images are captured using the Euclidean distance formula length and width of
from the same height and all are of the same size and of each and every grain is calculated.
the same format i.e., JPGE. The grains (Kidney Beans and
two rice varieties) are placed on a black sheet of paper. 3.1.2 Aspect ratio -
The captured image was processed and analysed using aspect ratio = length of kernel (l) / width of kernel (w)
SPYDER software. The programming language used is for any grain sample,
Python. Size, aspect ratio, colour is calibrated using image generally average value is considered:
processing. To detect the impurity and adulteration aspect ratio avg = average length of kernel (lavg) /
convolution neural network is used. average width of kernel (wavg)
© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 849
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 08 Issue: 03 | Mar 2021 www.irjet.net p-ISSN: 2395-0072
3.2 Color and Glossiness– 3.4. Adulteration and foreign matter –
3.2.1 Colour – The lesser quality grain is mixed with superior quality
grain to urge a far better price. The merchandise made up
The colour is an important characteristic of every grain of this sort of mixture can cause bad quality foods this
type. RGB image represents true colour images and RGB sort of adultery essential to be recognized while the
values are between 0 and 255. The colour featured choice of cereals, oilseeds and pulses. For this purpose, a
average red (R), green (G) and blue (B) colours. The valid grain detection algorithm based on image
colours values were measured by considering the centre processing has been used. The grains along with foreign
of the contour. materials such as stones, debris, dust, leaves, twigs, stems
and flowers are essential to de-escalate this model based
3.2.2 Glossiness – on machine learning CNN that is used to detect foreign
materials.
In grinding, bleaching and polishing greatly affect the
whiteness of the beans. During whitening, the s skin and 4. RESULTS
the outer layer of the brown rice are removed. Polishing
is done to improve the appearance of the white rice. 4.1 INPUT
Captured images are given for the process to the grain
3.3. Damaged / discoloured grains: instrument. For process, 1st it's needed for identification
of individual kernels within the input image. contours
Spoiled grains are the seeds of different types of cereal algorithmic rule is employed to induce the overall variety
grains with lower nutritional value through biochemical of regions in an exceedingly given image by change of
change in the appearance of bad odors and changes in integrity of the connected pixels. The labelling
physical appearance. These types of damage are caused algorithmic rule scans the image row-wise and uses the
because of moisture content, pest damage, physical merging algorithmic rule within which a pel receives a
damage, insects, and heat exposure. Damaged/discolored similar label as its neighbourhood pel, if the pixels gray
grains include broken fragments of whole that are values in threshold vary then it'll be labelled. It starts
internally damaged or discolored, immature, yellow, red from the 1st row and scans all pixels. For the second
or green color seed. row’s 1st pel it checks higher and higher right pixels. It
It can be measured as: checks encompassing connected pixels and proceeds for
% damaged grain = (Total no. of damaged seed / total seventy-one by one row. For the last row it checks higher
no. of seeds) X 100 and higher left pixels. Once scanning every pel in image
the label array is made. Figure 1, shows the input frame
that used for canny edge detection.
Figure 1. Input frame
The 1st stage in canny edge detector algorithmic rule is to
delete the noise within the frames by applying a Gaussian
filter. The frame once changing to grayscale and apply
Gaussian filter is appeared in Figure 2,
© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 850
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 08 Issue: 03 | Mar 2021 www.irjet.net p-ISSN: 2395-0072
in-depth frame. Figure five shows that the frame once
applied erosion and dilation operation.
To in brief summarize grain measure, after edge
detection and shut any gaps between edges, we detect
contours by mistreatment associate OpenCV operate
that's cv2.findContours to search out the shapes of the
grain within the edge map. we tend to organize contours
from left to right. The reference object within the frame is
Figure 2. Smoothed input frame for good the left one. By relying on the reference grain,
we tend to calibrate the camera and set the worth of
In the gradient stage, we tend to discover the sting parameters. Next, we tend to scan each contour, begin the
gradient and direction for every pel. For the outline the process on top of each individual contours. After that, the
gradient at each pel of ironed frame, cagey operator used. grains are going to be drawn in inexperienced. So, the
A complete scan of frame is going to be done points of the bounding box parallelogram can attract a
subsequently receiving gradient magnitude and little purple round. After that, we will get midpoints as a
direction, to eliminate any undesirable pixels which could result of the bounding box being ordered. Finally, we
not establish the sting. During this stage, simply native tend to calculate pixels Per Metric variable through
maxima should be thought-about as edges through dependence on the reference object. The height-distance
applying Non-maximum suppression. Non-maximum in pixels can be placed on the hD (height) variable and
suppression exchanges the smoothed edges within the breadth distance can be placed on wD (width) variable.
frame of the gradient magnitudes to sharp edges. Then, we tend to calculate the geometer distance among
The final stage of cagey edge detector algorithmic rule is sets of center points.
physical phenomenon thresholding. This stage selects
that square measure each edge square measure for sure
edges and that aren’t edges. the 2 threshold values 4.2 OUTPUT
square measure by trial-and-error elect and their
definition can upon on the content of a given frame. This For the experiment, the camera has been effectively
is often achieved via selecting huge and little threshold capturing the pictures. The proposed system applies four
values. If Edge pixels are stronger than the massive operations such as read capture image, find edges, find
threshold, it's marked like durable. robust edges are objects, and measure the size for each object. When we
going to be measured because the last edges. Also, edges run the operation, the output displays on the PC screen as
are going to be suppressed If a footing pixel is weaker appears in(FIG 3). When we run the application, then
than the tiny threshold, and it's marked as a weak edge if there are many other parameters that are calculated like
a footing pel is among the massive and little thresholds. length, breadth, color, aspect ratio and validation of that
To obtain the higher result and a lot of correct object grain and all the data like length, breadth, and validation
detection, the cagey edge detection procedure has been are stored in an excel sheet (FIG 4). The foreign matter is
improved with some Morphological operations [19]. detected by using the CNN model.
These procedures square measure unremarkably a mix of
nonlinear procedures performed comparatively on the
preparation of pixels while not dynamical their numeral
values. erosion and dilation square measure the keys for
morphological operations.
In this study, a morphological method is performed like a
mix of dilation and erosion. The gap is that the initial
procedure within which erosion is followed through
dilation. Closing is that the second operation within
which dilation is followed through erosion. As a mix of
those processes, we tend to square measure capable to
accumulate superior determination for discovery edges
Fig. 3 Calculate the size of grain
© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 851
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 08 Issue: 03 | Mar 2021 www.irjet.net p-ISSN: 2395-0072
No of
Grains AM-H PM- Accuracy AM- PM- Accuracy
H W W
(cm) (%) (%)
(cm) (cm) (cm)
1 0.98124 0.957 97.52% 0.60 0.574 95.66%
2 0.95 0.932 98.10% 0.62 0.605 97.58%
3 1.13 1.086 96.10% 0.612 0.606 99.01%
Fig. 4 Data Generated in Excel Sheet
Therefore, size measurement of individual grain, valid
4 1.09 1.084 99.44% 0.568 0.555 97.71%
and invalid grain detection, colour measurement and
impurity detection is done successfully.
4.3 ANALYSIS
In this study, a powerful grain analysis system is 1.01 0.973 96.33% 0.55 0.548 99.63%
5
introduced and the method proposed is for industrial
systems. Computer Vision is used to detect and analyse
grain and it gives more than 90% accuracy.
4.3.2 RICE SAMPLE - In the second sample of grain we
4.3.1 KIDNEY BEANS SAMPLE- In the first sample of measured the size of rice such as, shows the accuracy of
grain, we measured the size of beans such as, shows the the proposed object measurement system for these
accuracy of proposed object measurement system for objects. Abbreviations in the table are as follows; AM-H:
these objects. Abbreviations in the table are as follows; Actual Measure-Height, PM H: Proposed Measure-Height,
AM-H: Actual Measure-Height, PM-H: Proposed Measure- AM-W: Actual Measure-Width, PM-W: Proposed Measure-
Height, AM-W: Actual Measure-Width, PM-W: Proposed Width.
Measure- Width.
AM- PM- Accura PM- Accura
No of H H cy AM- W cy
Grains W
(cm) (cm) (%) (cm) (%)
(cm)
1 0.78 0.79 97.74 0.42 0.49 89.90%
5 1 % 0 0
2 0.89 0.93 93.29 0.72 0.69 95.83%
© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 852
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 08 Issue: 03 | Mar 2021 www.irjet.net p-ISSN: 2395-0072
5 5 % calibration file can be generated for the new grain type
and grain varieties introduced. One time effort needs to
be put into machine learning, then after the same
calibration file can give consistent results for the
measurement of the same type grain samples.
3 1.05 1.06 98.47 0.82 0.76 92.70%
1 7 % 3 3
REFERENCES
Journals
[1] DIGITAL IMAGE ANALYSIS USING FLATBED
SCANNING SYSTEM FOR PURITY TESTING OF RICE SEED
4 1.07 1.06 98.99 0.98 0.89 90.81% AND CONFIRMATION BY GROW OUT TEST Analisis Citra
% Digital dengan Sistem Pemindai Datar untuk Pengujian
Kemurnian Benih Padi dan Dikonfirmasi dengan Grow
Out Test Mira Landep Widiastutia , Aris Hairmansisb*,
Endah Retno Palupia and Satriyas Ilyasa
5 0.98 0.97 98.68 0.63 0.54 87.55
6 3 % 1 8 [2] USE OF THERMAL IMAGING TO IMPROVE THE FOOD
GRAINS QUALITY DURING STORAGE Nanje Gowda, N. A.
and Alagusundaram, K. Indian Institute of Crop
Processing Technology, Thanjavur, Tamil Nadu
[3] Image Analysis: A Modern Approach to Seed Quality
Testing Hemender1 , Sushma Sharma1*, V. S. Mor1 ,
Jitender1 and Axay Bhuker1 1 Department of Seed
Science & Technology, Chaudhary Charan Singh Haryana
Agricultural University, Hisar, India
[4] Classification of pepper seeds using machine vision
based on neural network Ferhat Kurtulmuş 1*, İlknur
Alibaş 1 , Ismail Kavdir2
CONCLUSIONS
In this study, a powerful grain analysis system is
introduced and the method proposed is for industrial
systems. Computer Vision is used to detect and analyse
grain and it gives more than 90% accuracy. A new
© 2021, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 853