A final year project on “Grain Quality Analysis and Classification using Image Processing Techniques” submitted by Nikhil Gaikwad (from JSPM’s Bhivrabai Sawant Institute of Technology and Research, Wagholi Pune) to extrudesign.com.
More than half the world’s people consume rice every day and fulfills over 21% calorific requirement of the world population. It is considered a whole grain which is rich in fibre and it contains 80% protein, phosphorus, and potassium. There are hundreds of different varieties of rice and each rice grain has a unique shape, texture, and flavour that make it just right for certain dishes. The quality of rice between various types has different standards. Therefore, you must select the best quality rice because rice with the best quality is not only good for consumption but also good for health. Analyzing grain samples manually is a tedious task and also time-consuming. The paper presents the solution to the analysis and grading of rice grains using image processing techniques. Image reduction, image enhancement, and image increment, object recognition in the spatial domain are applied on grain by grain of different samples of rice to determine its size, colour and quality as a whole to grade the grain of rice. We find the endpoints of each grain and after we measure the length and breadth of rice grains.
Keywords – Grading, Rice grain, Quality, Image processing, grain evaluation, rice parameters
Quality can be defined as the combined features and characteristics of a product or service to satisfy stated or implied needs. Grain quality is a combination of many factors such as smell (aroma), size, cooking characteristics, colour, nutritional value and percent whole grains. In the rice market, a key determinant of milled rice is quality. The quality measurement becomes more important with the import and export trade. Rice samples contain different dispensable objects like paddy, chaff, damaged grains, weed seeds, stones etc. Rice quality is varying according to these impurity content.
Rice grain shape is evaluated with length, width, and the ratio of length and width of rice grains. At present, the length and width of rice grains are usually measured by an inspector using a ruler or a micro-meter. For measuring the quality of the grain samples, the examiner needs to get few seeds from the sample and do the analysis. But for measuring the length and width of even a few seeds, placing them in the one-grain tray and measure the length and width of each seed one by one, is a very tedious task and takes lots of time.
The main purpose of the proposed method is, to offer an alternative way for quality control and analysis which reduce the required effort, cost and time. Image processing is significant and advanced technological area where important developments have been made. Machine vision and image processing are widely used in biological and agricultural research with the improvement of computer technology and significant reduction of the cost of hardware and software of digital imaging. Many researches applied machine vision to estimate rice appearance quality inspection.
The main purpose of the proposed method is, to offer an alternative way for quality control and analysis which reduce the required effort, cost and time. Image processing is significant and advanced technological area where important developments have been made. Image processing manipulates image for performing some operations on targeted image to get an improved and desirable image. And extort some valuable information from input image. Nowadays, image processing is hastily growing technologies. All types of data have to go through three general phases while using DIP technique which are pre-processing, enhancement, and display, information extraction.
The objective of the project is to detect the quality of rice efficiently. The project is aimed to reduce the efforts, costs and time. Here the system must perform the following:
- Use of image processing algorithms to analyze grains quality by its size and shape.
- To analyse and classify the quality of rice grains.
III. Proposed System for Image Processing
Quality of rice is not always easy to define as it depends on the consumer and the intended end use for the grain. All consumers want the best quality that they can afford. As countries reach self-sufficiency in rice production, the demand by the consumer for better quality rice has increased. The length, breadth and length – breadth ratio is measured by using image processing technique by counting and classifying the rice grains on the same basis. Length is the average length of rice grain while breadth is the average breadth of rice grain and length-breadth ratio is calculated as:
L/B = [(Average length of rice grain)/ (average breadth of rice)] *10.
In the first step image pre-processing is done. Here image registration takes place and noise is removed from the image by using the filter. Shrinkage algorithm used for segmenting the touching kernels which is the second step. In the third step, we perform edge detection to find out the region of boundaries. This is done using a canny algorithm. In the fourth, step rice seed measurement is done and in the same step length, breadth and length-breadth ratio is also measured. In the fifth step of the algorithm, rice is classified according to its size and shape which is the last step.
Image is captured using color camera and stored in RGB color space. Filter is applied to remove noise which occurs during the acquisition of image and also for sharpening the image. Threshold algorithm is used to segment the rice grains from the black background.
Shrinkage morphological operation:
Erosion and Dilation are morphological image processing operations. Erosion involves the removal of pixels at the edges of the region. Dilation is the reverse process with regions growing out from their boundaries. Erosion is applied to separate the touching features of rice grains without losing the integrity of a single feature. The dilation process follows the erosion process. The goal of dilation is to grow the eroded features to their original shape without re-joining the separated features.
Edge detection is used to detect the location and presence of edges by making changes in the intensity of an image. Edge detection helps to find out the region of boundaries of rice grains. We use a canny algorithm to detect the edges. The canny algorithm can segment the rice grains from the black background.
Object measurement is used to count the number of rice grains. After getting the count of rice grains, edge detection algorithms are applied to the image. The applied algorithm gives the endpoint values of each grain. We use a calliper to join the endpoints and measure the value of length and breadth of each grain. After getting the value of length and breadth we can calculate the length-breadth ratio.
All standard, measured and calculated results are required for object classification. The standard database for rice size and shape measurement is referred from the laboratory manual on rice grain quality, Directorate of Rice Research, Rajendra Nagar, Hyderabad. The classification of rice grains as per the standard database is shown in the following tables. The table below indicates the classification of rice grains on the basis of length and length-breadth ratio:
Classification of Rice Grains by using Image Processing
|Long Slender (LS)||Length 6 mm and above, L/B ratio 3 and above|
|Short Slender (SS)||Length less than 6 mm, L/B ratio 3 and above|
|Medium Slender (MS)||Length less than 6 mm, L/B ratio 2.5 to 3.0|
|Long Bold (LB)||Length 6 mm and above, L/B ratio less than 3|
|Short Bold (SB)||Length less than 6 mm, L/B ratio less than 2.5|
IV. Results and Discussions
Rice quality analysis has been done based on the parameters like length, breadth and length-breadth ratio and also if any dust is present it is identified. Also, classification is done under categories like Slender, Medium, Bold and Round.
The image analysis algorithms are applied on images in which rice grains are randomly placed and spread in one layer with a black background. If there are any touching kernels shrinkage operation works efficiently for separation of the connected part from point touching kernels. Edge detection is performed to find out the region of boundaries and endpoints of each grain. Then using calliper length and breadth can be measured. After getting the values for length and breadth, the length-breadth ratio is to be calculated.
Using an image processing algorithm is a better method for rice grain analysis by its length and breadth calculation. The advantages of image processing are it is a simple technique with less time and cost yet gives better results than manual work. The results are satisfactory.
- Nagoda, Nadeesha, and Lochandaka Ranathunga. “Rice Sample Segmentation and Classification Using Image Processing and Support Vector Machine.” In 2018 IEEE 13th International Conference on Industrial and Information Systems(ICIIS), pp.179-184. IEEE, 2018.
- Kolkure, V. S., and B. N. Shaikh. “Identification and quality testing of rice grain using image processing and neural network.” International Journal of Recent Trends in Engineering & Research (IJRTER) (2017).
- Parveen, Zahida, Muhammad Anzar Alam, and Hina Shakir. “Assessment of quality of rice grain using optical and image processing technique.” In 2017 International Conference on Communication, Computing and Digital Systems (CCODE), pp. 265-270. IEEE, 2017.
- Ali, Syed Farooq, Halima Jamil, Razia Jamil, Iqra Torij, and Saira Naz. “Low-Cost Solution for Rice quality analysis using Morphological parameters and its comparison with Standard measurements.” In 2017 International Multitopic Conference (INMIC), pp. 1-6. IEEE, 2017.
- Vishnu, Devraj, Gunjan Mukherjee, and Arpitam Chatterjee. “A computer vision approach for grade identification of rice bran.” In 2017 Third International Conference on Research in Computational Intelligence and Communication Networks (ICRCICN), pp. 10-14. IEEE, 2017.
- Pratibha, Nikhade, More Hemlata, M. Krunali, and S. T. Khot. “Analysis and Identification of Rice Granules Using Image Processing and Neural Network.” Dept. of Electronics and Telecommunication, Bharati Vidyapeeth’s College of Engineering for Women (2017).
- Philip, Teresa Mary, and H. B. Anita. “Rice Grain Classification using Fourier Transform and Morphological Features.” Indian Journal of Science and Technology 10, no. 14 (2017): 1-Report17.
- Manohar, M., K. Chatrapathy, and M. S. Sowmya. “Smart detection of rice purity and its grading.” In 2017 3rd International Conference on Applied and Theoretical Computing and Communication Technology (iCATccT), pp. 7173. IEEE, 2017.
Credit: This project is completed by Vijay Sonawane1, Nikhil Gaikwad2, Hrushikesh Mandekar3, Kishore Baradkar4, Chetan Gunjal5 from Department of Computer Engineering, JSPM’s Bhivrabai Sawant Institute of Technology and Research, Wagholi Pune.
Leave a Reply