ARID ZONE JOURNAL OF ENGINEERING, TECHNOLOGY & ENVIRONMENT AZOJETE December 2022. Vol. 18(4):693-706 Published by the Faculty of Engineering, University of Maiduguri, Maiduguri, Nigeria. Print ISSN: 1596-2644, Electronic ISSN: 2545-5818 www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 693 ORIGINAL RESEARCH ARTICLE APPLICATION OF IMAGE ANALYSIS IN FOOD GRAIN QUALITY INSPECTION AND EVALUATION DURING BULK STORAGE N. A. Aviara1*, A. A. Adesanya2, I. J. Iyilade2 E. O. Olorunsola2 and S. K. Oyeniyi2 1Department of Agricultural and Environmental Resources Engineering, University of Maiduguri, Maiduguri, Nigeria 2Department of Agricultural and Environmental Engineering, University of Ibadan, Ibadan, Nigeria. *Corresponding author’s email address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 1.0 Introduction Increase in consumer’s taste and awareness has led to the need of thorough quality inspection of food products. Food borne illnesses caused by food borne pathogens have been a major concern since they have led to the death of many people globally. These are some of the reasons why enhanced monitoring is required in grain bulk storage (Brosnan et al., 2004). Over the years, grain bulk storage quality inspection has been performed manually by quality assurance officers with little or no precision. Quality itself is said to be the conglomeration of all the elements that make food product acceptable to the consumer (Shewfelt et al., 2000). During bulk storage, grain quality is a function of soundness and admixtures, collection point, mills and terminals, cleaning, storage temperature and moisture content (Sinha and Muir 1973). The basis of quality assessment is also with attributes such as appearance, smell, texture and flavour frequently examined by human inspectors. Human inspection of grain quality in bulk storage has been found to be tedious, time consuming and inaccurate. Neethirajan et al. (2007) corroborated the above by noting that manual ARTICLE INFORMATION ABSTRACT With increased expectations for high quality food products and safety standards, the need for accurate, fast and objective quality determination of moisture, purity, germination and pathogen free food products and grains during bulk storage continues to grow. This paper reviews the application of image analysis in food grain quality inspection and discusses the potential of the technology for application in grain quality monitoring and evaluation during bulk storage. Image analysis procedure and physical properties of the grain bulk were also discussed. Image analysis is an automated alternative to manual inspection with less processing time and more accurate results. Human inspection has been found wanting due the bias judgment and results. Image analysis of food grains during bulk storage can only get better with its diverse applications in varietal identification, distinctness, uniformity and stability (DUS) testing, detection of insects and foreign bodies within the grain bulk and the detection of hot spot in the bin to mention a few. In Nigeria, image analysis will be a great tool in terms of grain quality preservation in National Grain Reserves (NGRs), providing seeds for farmers for the next planting season and reviving the grain reserves in Nigeria to boost gainful employment of citizens. An automated grain reserves using image analysis is possible in Nigeria only if appropriate government policies and funding can throw its full weight behind the innovation. © 2022 Faculty of Engineering, University of Maiduguri, Nigeria. All rights reserved. Submitted 7 March, 2022 Revised 12 May, 2022 Accepted 15 May, 2022 Keywords: Image analysis machine vision computer vision grain quality evaluation bulk storage http://www.azojete.com.ng/ mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Arid Zone Journal of Engineering, Technology and Environment, December, 2022; Vol. 18(4):693-706 ISSN 1596-2644; e-ISSN 2545-5818; www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 694 inspection, sieving, cracking-Xoatation and Berlese funnels being used at present to detect insects in grain handling facilities are not only inefficient but also time consuming. The need for fast and accurate measuring instruments cannot be over emphasized. One of the techniques that can be applied in the functioning of such equipment is the image analysis procedure. For real time image capturing and processing, the computer vision technique has commanded rapt attention for research and application for more than four decades. The application of this technique has found relevance in engineering fields such as robotics, industrial image processing, food processing and other fields. Some of the advantages of computer vision includes quickness, non-destructive evaluation possibilities, easy procedures for application, large output per unit time. Application of computer vision to food processing fields evolved first in 1989 for grain quality inspection (Zayas et al., 1989). Principal areas of application of computer vision technology in food industry include quality evaluation of food grains, fruits, vegetables and processed foods such as chips, cheese and pizza. The technique has also been found useful for determination insect infestation in grains and blemishes in fruits and vegetables (Mahendran et al., 2011). Computer vision is a broad area of research and a comprehensive definition is difficult to distil, a generally accepted definition of computer vision is ‘the analysis of images to extract data for controlling a process or activity’ (Mahendran et al., 2011; Relf, 2004). This paper examines the potentials of image analysis procedure for application in food grain quality inspection and evaluation during bulk storage. 2. Image Analysis Procedure As highlighted by Gujjar and Siddappa (2013), the procedure for application of image analysis in food grain quality evaluation during bulk storage of samples is shown in Figure 1. Figure 1: Procedure for food grain image acquisition, identification and processing Source: Gujjar and Siddappa (2013). 2.1 Steps Involved in Image Analysis Steps involved in image analysis according to Siddagangappa and Kulkarni (2014) include the following: image acquisition, preprocessing image, filtering image, binarization and image segmentation. 2.1.1 Image Acquisition The images are acquired with a colour digital camera or using sensor to capture images of grain samples. In order to obtain a good image, proper illumination must be provided and kept a fixed distance between the camera and the grain samples. The environment has to be controlled to improve the data collection with sample being plain background. The grains are spread on a blue sheet randomly, such that they are not in contact with other grains. The images should be captured and stored in JPEG format automatically (Siddagangappa and Kulkarni, 2014, Chitra et al., 2016). Food grain image Image Enhancement Image segmentation Classification decision Feature selection and Extraction Neutral Network file:///C:/user/Downloads/azojete143/www.azojete.com.ng mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Aviara et al: Application of Image Analysis in Food Grain Quality Inspection and Evaluation During Bulk Storage. AZOJETE, 18(4):693-706. ISSN 1596-2644; e-ISSN 2545-5818, www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 695 2.1.2 Preprocessing of Image This is one of the steps for enhancement of quality of the captured image.Gaussian filter for image smoothering is normally used and grayscale image is binarized after use of threshold method to eliminate background noise (Siddagangappa and Kulkarni, 2014, Chitra et al., 2016 ). 2.1.3 Filtering Image The images of grains in storage are often corrupted due to the variation in illumination, intensity or may have poor contrast and cannot be used directly. Filtering aids in transformation of the intensity values to reveal certain image characteristics. The original and filtered images of samples of cowpea are shown in Figure 2 (A and B), respectively (Siddagangappa and Kulkarni, 2014). (A) (B) Figure 2: Original image (A) and Filtered image (B) of white cowpea Source: Siddagangappa and Kulkarni (2014). 2.1.4 Binarization Binarization of an image is a process representing an image using only two different pixel values. It can be performed by classifying a grayscale image into two groups of pixels based on certain threshold gray value. The pixel values greater than or equal tio the threshold is set to a particular gray value and those below the threshold to another gray value. The quality of the binary image is much dependent on how appropriately the threshold for binarization are chosen (Visen et al., 2004). An example of binarization can be given as follows: If f(x,y) ˃ T then f(x,y) = 0 else f(x,y) = 255 (1) where: T is a threshold value and x and y are co-ordinates. 2.1.5 Image Segmentation Segmentation accuracy determines to a large extent, the eventual success or failure of computerized analysis procedures. Segmentation basicly includes edge detection. Appropriate image segmentation for white cowpea is shown in Figure 3. Threshold is also one of the approaches of segmentation. The other approach is region oriented segmentation also known as watershed segmentation. After enhancement of image, the edges of the object in binary image have to be detected using Canny and Sobel detector (mask). Edge detection using Sobel detector results in more accuracy than using Canny edge detector (Siddagangappa and Kulkarni, 2014, Chitra et al., 2016). http://www.azojete.com.ng/ mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Arid Zone Journal of Engineering, Technology and Environment, December, 2022; Vol. 18(4):693-706 ISSN 1596-2644; e-ISSN 2545-5818; www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 696 Figure 3: Image of white cowpea after segmentation Source: Siddagangappa and Kulkarni (2014). 2.2 Feature Extraction. 2.2.1 Colour Feature Extractions According to Gujjar and Siddappa (2013), alogrithms can be developed using MATLAB 7.0 programming language to extract colour features of individual grains. From Red (R), Green (G), and Blue (B) colour bands of an image, Hue (H), Saturation (S), Intensity (I) can be calculated using Equations (2 – 4) 1 = 1 3 (𝑅 + 𝐺 + 𝐵) (2) 𝑆 = 1−3(𝑚𝑖𝑛(𝑅,𝐺,𝐵)) (𝑅+𝐺+𝐵) (3) 𝐻 = cos−1{((𝑅−𝐺)+(𝑅−𝐺))} 1 2 {(𝑅−𝐺)2+(𝑅−𝐺)(𝐺−𝐵)} 1 2 (4) The mean values of I, S and H, as well as their minimum and maximum values can be calculated for an image after segmentation, thereby enabling nine colour features to be extracted. 2.2.2 Morphological Feature Extraction Algorithms developed in windows environment using MATLAB 7.0 programming language can be used to extract morphological features of individual grains following the procedure described by Gujjar and Siddappa (2013). The following morphological features can be extracted from images of individual grains as shown in Figure 4. Area: The algorithm can calculate the number of pixels inside, and include the seed boundary (mm²/pixel). Length: This can be taken as the length of the rectangle bounding the seed. Width: It is the width of the rectangle bounding the seed. Major axis length: This can be taken as the distance between the end points of the longest line that could be drawn through the seed. The major axis end points can be found by computing the pixel distance between every combination of border pixels in the seed boundary. Minor axis length: This is the distance between the end points of the longest line that could be drawn through the seed while maintaining perpendicularity with the major axis. Aspect ratio, K1: This is the ratio of the minor axis to the major axis. file:///C:/user/Downloads/azojete143/www.azojete.com.ng mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Aviara et al: Application of Image Analysis in Food Grain Quality Inspection and Evaluation During Bulk Storage. AZOJETE, 18(4):693-706. ISSN 1596-2644; e-ISSN 2545-5818, www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 697 Rectangular aspect ratio, K2: This is the ratio of the intermediate axis or width to the major axis or length. Figure 4: Images of white cowpea seeds after morphological operations Source: Siddagangappa and Kulkarni (2014). 2.2.3 Textural Feature Extraction Algorithms can be developed in windows environment using MATLAB 7.0 programming language to extract textural features of individual grain images (Gujjar and Siddappa, 2013, Chitra et al., 2016). 3. Related Works on Image Analysis Application Computer vision can function as an inspection approach for grain quality evaluation. It stands as an automated, non-destructive and cost-effective technique to accomplish these requirements. Computer vision has been successfully adopted for the quality analysis of meat, fish, pizza, cheese, and bread. Likewise, grain quality and characteristics have been examined by this technique. Xiang (1997) worked on colour image analysis for cereal grain classification. He differentiated images of individual kernels and bulk grain samples for five grain types in Canada. Neethirajan and Jayas (2007) developed sensors for grain storage. This is to mitigate grain loss due to deterioration during storage. Shah and Khan (2014) investigated imaging techniques for the detection of grain deterioration due to pests (insects and fungi) during storage. Lai et al. (1986) suggested some pattern recognition techniques for identifying and classifying cereal grains. This method yielded 100% accurate prediction for the samples used in the study. The pattern obtained was selected out of a great number of possible ones. The grains considered here were corn, wheat, soyabean and sorghum. Zayas et al. (1989) illustrated the use of image analysis to discriminate between wheat and non- wheat components in a grain sample. They presented two methods, multivariate discriminate and a structural prototype method for pattern recognition. The main concern in this method was the misclassification of irregularly shaped stones as wheat. The limitation in the proposed method was the requirement to manually orient the kernels. Visen et al. (2004) proposed algorithms to acquire and process color images of bulk grain samples of five grain types, namely oats, barley, rye, wheat, and durum wheat. The developed algorithms were used to extract over 150 color and textural features. A back propagation neural network-based classifier was developed to identify the unknown grain types. The color and textural features were presented to the neural network for training purposes. The trained network was then used to identify the unknown grain types. Classification accuracies of over 98% were obtained for all grain types. Huang et al. (2004) proposed a method of identification based on Bayes decision theory to classify rice variety using color features and shape features with 88.3% accuracy. Majumdar and Jayas (2000) developed http://www.azojete.com.ng/ mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Arid Zone Journal of Engineering, Technology and Environment, December, 2022; Vol. 18(4):693-706 ISSN 1596-2644; e-ISSN 2545-5818; www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 698 classification models by combining two or three features sets (morphological, color, textural) to classify individual kernels of Canada Western Red Spring (CWRS). Anami et al. (2005) developed a Neural network approach to classify single kernel of different grains like wheat, maize, groundnut, redgram, green gram and black gram based on color, area covered, height and width. The minimum and maximum classification accuracies were 80% and 90% respectively. Sanjivini et al. (2010) using this approach, performed texture and morphologically based retrieval on a couple of food grain images. Image warping and image analysis approach were applied. Normalization of food grain images was employed and elimination of the effects of orientation using image warping technique with proper scaling was achieved. The images were properly enhanced to reduce noise and blurring. The approach was tested on sufficient number of food grain images of rice based on intensity, position and orientation. A digital image analysis algorithm based on color, morphological and textural features was developed to identify the six varieties of rice grains which were widely planted in the Chhattisgarh region of India. The accuracy of the results was between 80% and 90%. In this case, pre-processing and segmentation process was found to be tedious. Savakar, (2012) illustrated an algorithm for recognition and classification of similar looking grain images using artificial neural networks and that showed that accuracy of 78- 84% was achieved by using either individual color or texture feature, and accuracy of 85- 90% was seen when both features were combined. Kaur and Singh (2013) proposed a machine algorithm to grade rice grains into Premium, Grade A, Grade B and Grade C, respectively, using Multi-Class SVM. Maximum Variance method was applied to extract the rice kernels from background, after the chalk had been extracted from rice. The percentage of head rice, broken rice and brewers in rice samples were determined using ten geometric features. Multi-Class SVM classified the rice kernel by examining the shape, chalkiness and percentage of broken (head rice, broken and brewers) kernels. The SVM classified accurately to more than 86%. Based on the results, it was concluded that the system was enough to use for classifying and grading the different varieties of rice grains based on their interior and exterior quality. Mebatsion et al. (2013) proposed a method for the classification of cereal grains, namely; barley, rye, oats and wheat (Canada Western Amber Durum (CWAD) and Canada Western Red Spring (CWRS)). This was performed using morphological and color features. The combined model defined by morphological and color features achieved a classification accuracy of 98.5% for barley, 99.97% for CWRS, 99.93% for oat, and 100% for rye and CWAD. Pabamalie and Premaratne, (2010) focused on providing a better approach for identification of rice quality by using neural network and image processing concepts. Here a back propagation neural network with two hidden layers was developed for the quality classification. Thirty-one texture and color features that have been extracted from rice images were used for discriminate analysis. Here foreign matters, type of admixture and brown grain content were the three parameters considered for sample preparation. Tests on the system for the training and test sets showed accuracy between 68 and 94% for the four grades. Lukas and Stejskal (2003) applied computer based image analysis to the estimation of area of sticky trap occupied or contaminated by pests and used the results to differentiate between heavy and weak contaminators. Venkatesh et al. (2015) developed a simple and easy- to- operate automatic sorting system based on digital image processing for defect detection and sorting of grains, fruits and vegetables. The sorting operation was based on the features extracted from the images by different image processing techniques. The quality of fruits vegetables and grains used were color, firmness and bruises, since these formed the relevant sorting parameters for classifying the agro-products in terms of ripeness, decaying and growth defects respectively. Results showed that the products were successfully sorted. file:///C:/user/Downloads/azojete143/www.azojete.com.ng mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Aviara et al: Application of Image Analysis in Food Grain Quality Inspection and Evaluation During Bulk Storage. AZOJETE, 18(4):693-706. ISSN 1596-2644; e-ISSN 2545-5818, www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 699 4. Potential Applications of Image Analysis during Bulk Storage The following areas of application of image analysis due to Varma et al. (2013) and Gowda et al. (2013) can be adapted for grain quality inspection and evaluation during bulk storage:  Distinctness, Uniformity and Stability (DUS) testing;  Varietal identification;  Moisture  Sorting and grading;  Detection of foreign bodies in grains;  Detection of insect infestation inside grain kernel;  Detection of hot spots in grain bin. 4.1 Distinctness, Uniformity and Stability (DUS) testing One of the applications of image analysis is testing for Distinctness, Uniformity and Stability (DUS). New varieties are compared to create differences (distinctness) from existing varieties before they are given official recognition. The goal is to identify consistent differences in respect of one or more characters between existing and potential new varieties. The physical and visual traits of the seed are potential characters. Manually, differences in appearance can be assessed by measurement or subjective scoring. Measurement can be used for simple size and shape measurements, such as lengths and their ratios while subjective scoring is used for more subtle differences that would be more difficult or cumbersome to measure (Varma et al., 2013). The disadvantage of this method is that it is tedious to do and subject to inconsistency between observers and over time. There have been a number of attempts to use image analysis to assess seed appearance. These have ranged from straightforward use of colour meters (McMichael, 1994) to the use of image analysis to extract shape features (Keefe et al., 1988). The development of non- destructive methods for the evaluation of cereal grain varieties has important implications for the food processing industry. 4.2 Varietal Identification Seed identification processes by manual means by technicians is slow, prone to error and subjective and give results which may be difficult to quantify for both economic and technological purposes. Therefore, it is important economically and technically to implement repeatable and quick automated methods to identify and classify seeds. Seed varieties provide necessary options to growers, processors and consumers (Varma et al., 2013). Variety identification is also important for plant breeders and geneticists. Visual assessments made using color, size, shape and texture are easily achieved, but the results possess questionable integrity. Reliable visual evaluation needs experience and expertise (Varma et al., 2013). An objective method will help in reducing the subjective nature of this visual assessment. Automatic systems can be based on seed images, from which the characteristics for the classification, such as size, shape, colour and texture, can be obtained quickly (Kapadia et al., 2017, Tanwar et al., 2018). Digital image analysis offers an objective and quantitative method for estimation of morphological parameters (Varma et al., 2013). Smykalova et al. (2013) carried out the phenotypic evaluation of flax seeds using image analysis and reported that the discrimination of variety, locality and stability of fax seeds was possible with the technique, Zhang et al. (2018) used digital image analysis to carry out the phenotyping of seeds and seedlings, while Ansari et al. (2021) inspected the varietal purity of paddy grains using machine vision and multivariate analysis. Other studies that explored the use of image analysis in varietal difference detection include Vijaya Geetha et al. (2011) http://www.azojete.com.ng/ mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Arid Zone Journal of Engineering, Technology and Environment, December, 2022; Vol. 18(4):693-706 ISSN 1596-2644; e-ISSN 2545-5818; www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 700 (mustard), Saini et al. (2014), Vresak et al. (2016) and Grillo et al. (2017) (wheat), Aznan et al. (2017) and Pratibha et al. (2017) (rice), and Tu et al, (2021) (maize). 4.3 Moisture According to Hellevang (1995), grain moisture content affects economic returns because it affects the quantity of grains, grain storability and grain marketability. Change in grain moisture content results to changes its weight. This change in weight is also called shrink (Hellevang, 1995). The importance of moisture content as a factor in grain quality deterioration cannot be overemphasized. It controls the development of bacteria, mites, fungi and insects that are responsible for the spoilage of grains in storage. Due to this, it is necessary to bring all food grains to safe moisture content before storage (Gowda et al., 2013). However, this safe moisture content is related to the required storage time because the lesser the moisture content of the grain, the lesser the insect activity and the respiration rate of the grain. Insect infestation tends to increase in moisture content above 10% up to a certain limit. Generally, insect activity is rapid at relative humidity exceeding 75%. One of the most remarkable features about the storage insect pests is that some of them can live in products having moisture content less than 10% (Sashidhar et al., 1992). With the use of image analysis, the effects of moisture content on insect activity in bulk storage can be detected and monitored. Bora et al. (2018) used image processing analysis to track colour changes in apple and determine the product moisture content at different stages of the drying process. Mohd Ramli et al. (2021) used voxel weighting from radio tomography images to determine the moisture content of rice. 4.4 Sorting and Grading Grading and sorting is essential for seed classification, separating the good seed from the bad ones and also seeds of different physical properties. A number of techniques for seed quality evaluation and sorting are based on the detection of various physical properties of seeds (Varma et al., 2013). The declining cost and increasing speed and capability of computer hardware of image processing and its integration with controlled environmental condition systems have made computer vision more attractive for use in automatic inspection of crop seeds in storage. New algorithms and hardware architectures have been developed, and the availability of appropriate image analysis software tools suggests that the use of machine vision systems is becoming convenient during seed bulk storage (Varma et al., 2013). For example, Kapadia et al. (2017) noted that Han et al. (1996) utilized frequency domain image analysis in detecting stress cracks in corn kernels. A fast fourier transform algorithm was applied to the pre-processed images and the transformation results were condensed into seed feature signatures representing position or orientation invariant morphological features. Stress cracks are internal fissures that can be observed in kernels by x-ray inspection (Kapadia et al., 2017). Chaugule and Mali (2014) evaluated texture and shape using neural network and applied this to the classification of four paddy varieties. The most suitable features for the accurate classifications of the features of the four varieties were identified. The most satisfactory results were delivered by the shape feature and texture feature sets. Raj and Swaminarayan (2015) reviewed the application of image processing in the grading of agricultural products and noted that the technique along with classification algorithms yielded very good results. Han et al. (2014) graded wheat grains using digital image processing techniques, Dessai and Rao (2017) graded rice grains using image analysis and Artificial Neural Network (ANN) and Jitanan and Chimlek (2019) graded soya beans in terms of quality using image processing and machine learning. file:///C:/user/Downloads/azojete143/www.azojete.com.ng mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Aviara et al: Application of Image Analysis in Food Grain Quality Inspection and Evaluation During Bulk Storage. AZOJETE, 18(4):693-706. ISSN 1596-2644; e-ISSN 2545-5818, www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 701 4.5 Detection of Foreign Bodies in Grains Foreign bodies may be defined as any unwanted substances (dirt, stone, dead insects, rat excreta etc.) which are present in desired product (food grains). The high demand and expectations of consumer to get pure product free from these foreign materials have made food industry to invest on machineries for processing and inspection to ensure a good quality product for consumers (Gowda et al., 2013). Several conventional methods like visual inspection which is time consuming, laborious and physical separation methods such as sieving, elutriation, sedimentation, screening, filtering, and gravity separation and advanced devices like metal detectors, X-ray machines and optical sensors have been employed, but it was found that distinguishing foreign materials and the product depends on the response of the energy spectrum between the product and foreign body, hence there is no any device which can detect these type of contaminants regardless of size, shape and type (Vadivambal and Jayas, 2010). Meinlschmidt and Margner, (2003) developed a thermal imaging setup to detect foreign materials like rotten nuts, hard shells, and stones in hazelnuts which are continuous moving over a belt conveyor. Using three image processing techniques (histogram analysis, texture analysis) an object-oriented algorithms for grains and online thermal imaging were developed. Gujjar and Siddappa (2014) used Artificial Neural Network (ANN) and image segmentation to detect foreign bodies in grain samples with success rate that was appreciable. Jiang et al. (2018) combined image preprocessing and threshold segmentation algorithm with terahertz time domain spectroscopy reflection imaging to detect foreign bodies embedded in bulk wheat grains and the technology proved a useful tool. Ghatkamble (2021) used the machine vision system to automatically determine the amount of the foreign bodies present in rice grains. This system was found to be helpful to farmers in the sowing of the seeds and marketing of the rice grains. Digital image analysis algorithms were developed using machine learning techniques in MATLAB and Python programming language to determine the foreign bodies present in the rice grain samples applying the neural network method. The foreign bodies in the rice grain image samples were determined based on the color, texture and morphological features. All three features mentioned above were supplied to the neural network for training purpose and the trained network was later used to identify the foreign bodies in the grains. Salam et al. (2022) used image processing and different classification algorithms to detect foreign materials in chickpea mixtures with the ANN giving overall superior accuracy of results over the SVM and LDA. 4.6 Detection of Insect Infestation inside Grain Kernel It is easier and better to prevent an insect infestation than to treat an established infestation. Therefore, the on time detection and tracing insect infestation in stored grains play a vital role in order to take necessary action for insect control. The general methods for this purpose preferred are:  Determination of CO2 production method which is not appropriate for high moisture grains (more than15%) since the CO2 produced by the grains and other microorganisms will interact with the results.  Ninhydrin reaction with amino acids of grain which is an destructive method  Floatation method which is not suitable for Cryptolestes spp.  Acoustic method which cannot detect eggs and pupae of insect.  The X-ray method, which cannot detect larval development. However, all these methods are standardised by the International Standards Organisation (ISO) to find the hidden infestation in cereals and pulses methods have few limitations in applications. http://www.azojete.com.ng/ mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Arid Zone Journal of Engineering, Technology and Environment, December, 2022; Vol. 18(4):693-706 ISSN 1596-2644; e-ISSN 2545-5818; www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 702 Other method still being used are insect traps for small scale stored grains and Berlese funnels method which is time consuming and cannot be used for all types of insect species (CFIA, 2008). However, Neethirajan et al. (2007) and Shah and Khan (2014) noted that the acoustic technique (possibly imaging), Near-infrared hyperspectral imaging and soft x-rays showed potentials for application in the accurate detection of internal infestations of stored grains. Digital images of the scanned object are normally analyzed for various spectral and spatial features using statistical techniques that yield high classifications accuracies. 4.7 Detection of Hot Spots in Grain Bin Hot spots in grain bin are high temperature areas which are created by respiration of fungi, insect or the stored grains itself. It initiates the spoilage of grains. Reasons for hotspot development are:  Loading of high moisture grains over dry grain inside storage bin;  Entry of water through leaks and holes;  Moisture migration within grain bulk due to respiration of insect or grain  Moisture rising through cracked floor. Hot spots, originating from either fungal or insect activity, may develop during the late fall, particularly in non-aerated grains. Wilkins (1983) affirmed that that heating by fungi was initiated during the dry season primarily by the activity of low temperature Penicillium species growing in a 4-month old grain pocket of -5°C to +8°C and 18.5% to 21.8 % moisture content. White and Muir (2001) suggested that grain bulk in storage structures should be inspected at least once in week at a depth of less than 0.5m interval to detect the hot spots. The common methods of temperature measurement are carried out by using large numbers of thermocouples, thermometers, thermistors, resistant temperature detectors installed at various locations of bin. The short comings of these instruments are that they will measure the temperature only at specific points if the instruments are in contact with the object. Therefore, to accomplish this large number of temperatures, sensing devices should be installed throughout the grain bulk. In case the storage bin is too large, it would become even more complicated to find hot spots using these devices which measures temperature only at specific points. Therefore, image analysis is an exceptional alternate method which can sense the temperature distribution across a specific area of interest by capturing a thermal image using infrared camera without making contact with grain sample. Manickavasagan et al. (2006) reported that thermal imaging while giving good results may not be used as an independent method to monitor the grain temperature in a silo. However, Gowda and Alagusundaram (2013) reviewed the application of thermal imaging in grain storage and noted that the technique would be an appropriate tool for protecting stored grains by its use in measuring temperatures in storage bins to detect hotspots, and Wang et al. (2021) presented cloud imaging as a technique that possesses great potential for application in this field. 5. Conclusion Image analysis, with its ability to emulate human intelligence in handling visuals ingrain bulk storage, is an important technology that finds many applications in modern seed varietal identification and quality control. It is already an extremely powerful and will continue to improve, following developments in computing technology along with the sensory and central processing elements. In the context of grain bulk storage, image analysis techniques are capable of coping with the variability and therefore have potential for wide-ranging applications. Development in image acquisition, pattern recognition and decision making as well as improvements in software and hardware technologies will help to improve the file:///C:/user/Downloads/azojete143/www.azojete.com.ng mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Aviara et al: Application of Image Analysis in Food Grain Quality Inspection and Evaluation During Bulk Storage. AZOJETE, 18(4):693-706. ISSN 1596-2644; e-ISSN 2545-5818, www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 703 system. The technology has the ability to create more jobs in Nigerian economy through the establishment of automated grain reserves, which would enhance food security and produce high quality grains. The challenges to this technology include lack of appropriate government policies, funding, technical expertise and the ease of accepting the technology. References Anami, BS., Savakar, DG., Aziz Makandar, A. and Unki, PH. 2005. A neural network model for classification of bulk grain samples based on color and texture. Proceedings of International Conference on Cognition and Recognition, held at Mandya, India, on 22 and 23 December, 2005., pp. 359-368. Ansari, N., Ratri, SS., Jahan, A. and Ashik-E-Rabbani, M. 2021. Inspection of paddy seed varietal purity using machine vision and multivariate analysis. Journal of Agriculture and Food Research, 3: 100109. Aznan, AA., Rusland, R., Rukunudin, IH., Azizan, FA. and Hashim, AY. 2017. Rice seed varieties identification based on extracted colour features using image processing and Artificial Neural Network (ANN). International Journal on Advanced Science, Engineering and Information Technology, 7(6): 2220-2225. Bora, GC., Pathak, R., Ahmadi, M. and Mistry, P. 2018. Image processing analysis to track colour changes in apple and correlate to moisture content in drying stages. Food Quality and Safety, 2: 105-110. Brewbaker, JL. 2003. Corn production in the tropics. The Hawaii experience. College of Tropical Agriculture and Human Resources, University of Hawaii at Manoa. CFIA. 2008. Inspection Procedure PI-003: Detecting and Identifying Small Organisms Associated with Grains and Field Crops. Canadian Food Inspection Agency, Ottawa. Changule A. and Mali, SN. 2014. Evaluation of texture and shape features for classification of four paddy varieties. Journal of Engineering, 2914, Art. ID617263: 1-8. Chitra, HSH., Suguna, S. and Sujatha, SN. 2016. A survey on image analysis techniques in agricultural products. Indian Journal of Science and Technology, 9(12): 1-13. Dessai, S. and Rao, AP. 2017. Seed quality analysis using image processing and ANN. International Journal of Trend in Scientific Research and Development, 1(4): 698-702. Ghatkamble, R. 2021. Identification and Classification of Foreign Bodies from Rice Grains Using Digital Image Processing. In: Tuba, M., Akashe, S., Joshi, A. (eds) ICT Systems and Sustainability. Advances in Intelligent Systems and Computing, 1270. Springer, Singapore. https://doi.org/10.1007/978-981-15-8289-9_27 Gonzales, HB., Armstrong, PR. and Maghirang, RG. 2009. Simultaneous monitoring of stored grain with relative humidity, temperature, and carbondioxide sensors. Applied Engineering in Agriculture, 25(4): 595‐604. Gowda, NA. and Alagusundaram, K. 2013. Use of Thermal Imaging to Improve the Food Grains Quality during Storage. International Journal of Current Agricultural Research, 1(7): 34-41. http://www.azojete.com.ng/ mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com Arid Zone Journal of Engineering, Technology and Environment, December, 2022; Vol. 18(4):693-706 ISSN 1596-2644; e-ISSN 2545-5818; www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 704 Grillo, O., Blangiforti, S. and Venora, G. 2017. Wheat landraces identification through glumes image analysis. Computers and Electronics in Agriculture, 141: 223-231. Gujjar, HS. and Siddappa, M. 2013. A method for Identification of Basmati rice grain of India and its quality using pattern classification. International Journal of Engineering Research and Applications, 3(1): 268-273. Gujjar, HS. and Siddappa, M. 2014. Recognition and classification of different types of food grains and detection of foreign bodies using Neural Network. International Journal of Computer Applications: Proceedings of the International Conference on Information and Communication Technology held on 14-17 April, in Bali, Indonesia, pp. 12-17. Han, X-Z., Wang, K-J., Yuan, Y., Chen, C. and Liang, L. 2014. Research on grading detection of the wheat seeds. The Scientific World Journal, 2014, Article ID 702906: 1-6. Han, YJ., Feng, Y. and Weller, CL. 1996. Frequency domain image analysis for detecting stress cracks in corn kernels. Applied Engineering in Agriculture, 12(4): 487-492. Huang, XY., Li, J. and Jiang, S. 2004. Study on identification of rice varieties using computer vision. Journal of Jiangsu University (Natural Science Edition), 25(2):102-104. Jiang, Y., Ge, H. and Zhang, Y. 2018. Detection of foreign bodies in grains with terahertz reflection imaging. Optics, https://doi.org/10.1016/j.ijleo.2018.066: 1-14. Jitanan, S. and Chimlek, P. 2019. Quality grading of Soyabean using image analysis. International Journal of Electrical and Computer Engineering, 9(5): 3495-3503. Kapadia, VN., Sasidharan, N. and Kalyanrao, P. 2017. Seed image analysis and its application in seed science research. Advances in Biotechnology and Microbiology, 7(2): 0043-0045. Kaur, H. and Singh, B. 2013. Classification and Grading Rice using Multi-Class SVM. International Journal of Scientific and Research Publications, 3(4): 1-5. Lai, FS., Zayas, I. and Pomeranz, Y; 1986. Application of pattern recognition techniques in the analysis of cereal grains. Cereal Chemistry, 63(2):168–174. Lukas, J. and Stejskal, V. 2003. Computer-based image analysis to estimate the area of a sticky trap occupied or contaminated by pests. Plant Protection Science, 39: 52–60. Mahendran, R., Jayashree, GC. and Alagusundaram, K. 2011. Application of Computer Vision Technique on Sorting and Grading of Fruits and Vegetables. Journal of Food Processing Technology, S1-001: 1-7., doi:10.4172/2157-7110.S1-001. Majumdar, S. and Jayas, DS. 2000. Classification of cereal grains using machine vision. IV. Combined morphology, color, and texture models. Transactions of the ASAE, 43(6): 1689- 1694. Manickavasagan, A., Jayas, DS., White, NDG. And Jian, F. 2006. Thermal imaging of a stored grain silo to detect hotspot. Applied Engineering in Agriculture, 22(6): 891-897. file:///C:/user/Downloads/azojete143/www.azojete.com.ng mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com https://doi.org/10.1016/j.ijleo.2018.066 Aviara et al: Application of Image Analysis in Food Grain Quality Inspection and Evaluation During Bulk Storage. AZOJETE, 18(4):693-706. ISSN 1596-2644; e-ISSN 2545-5818, www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 705 Mebatsion, HK., Paliwal, J. and Jayas, DS. 2013. Automatic classification of non-touching cereal grains in digital images using limited morphological and color features. Computers and Electronics in Agriculture, 90: 99-105. Meinlschmidt, P. and Margner, V. 2003. Thermographic techniques and adopted algorithms for automatic detection of foreign bodies in food. Proceedings of SPIE, Thermosense XXV, held on 1st April at Orlando, Florida, 5073: 168-177., https://doi.org/10.1117/12.488701. Mohd Ramli, NA., Fazalul Rahiman, MH., Kamarudin, LM., Mohammed, L., Zakaria, A., Ahmad, A. and Rahim, RA. 2021. A new method of rice moisture content determination using voxel weighting-based from radio tomography images. Sensors, 21: 3686-1-19. Neethirajan, S. and Jayas, DS. 2007. Sensors for Grain Storage. ASABE Paper No. 076179. St. Joseph, Michigan, USA. Neethirajan, S., Karunakaran, C., Jayas, DS. White, NDG. 2007. Detection techniques for stored-product insects in grain. Food Control, 18: 157–162. Pabamalie, LAI. and Premaratne, HL. 2010. A Grain Quality Classification System. Proceedings of the International Conference on Information Society, held on 28-30 June, London, UK. Institute of Electrical and Electronics Engineers, pp. 56-61. Pratibha, N., Hemlata, M., Krunali, M. and Khot, ST. 2017. Analysis and identification of rice granules using image processing and Neural Network. International Journal of Electronics and Communication Engineering, 10(1): 25-33. Raj, MP. and Swaminarayan, PR. 2015. Application of image processing for grading agricultural products. International Journal of Recent and Innovation Trends in Computing and Communication, 3(3): 1194-1201. Saini, M., Singh, J. and Prakash, NR. 2014. Analysis of wheat grains varieties using image processing – a review. International Journal of Science and Research, 3(6): 490-495. Salam, S., Kheiralipour, K. and Jan, F. 2022. Detection of unripe kernels and foreign materials in chickpea mixtures using image processing. Agriculture, 12: 995-1-10. Savakar, D. 2012. Recognition and Classification of Similar Looking Grain Images Using Artificial Neural Networks. Journal of Applied Computer Science and Mathematics, 6(13): 61-65. Shah, MA. and Khan, AA. 2014. Imaging techniques for detection of stored product pests. Applied Entomology and Zoology, 49(2): 201-212. Siddagangappa, MR. and Kulkarni, AH. 2014. Classification and Quality Analysis of Food Grains. IOSR Journal of Computer Engineering (IOSR-JCE), 16(4, Ver. III): 01-10., www.iosrjournals.org. Singh, N., Delwiche, MJ., Johnson, RS. and Thompson, J. 1992. Peach maturity grading with color computer vision. ASAE Paper No. 92-3029. St. Joseph, Michigan, USA. Sinha, RN. and Muir, WE. 1973. Grain Storage: Part of a System. The AVI Publishing Company Inc., Westport Connecticut., pp. 27-50. http://www.azojete.com.ng/ mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com https://doi.org/10.1117/12.488701 http://www.iosrjournals.org/ Arid Zone Journal of Engineering, Technology and Environment, December, 2022; Vol. 18(4):693-706 ISSN 1596-2644; e-ISSN 2545-5818; www.azojete.com.ng Corresponding author’s e-mail address: ndubisi.aviara@unimaid.edu.ng, nddyaviara@yahoo.com 706 Smykalova, I., Grillo, O., Bjelkova, M., Pavelek, M. and Venora, G. 2013. Phenotypic evaluation of flax seeds by image analysis. Industrial Crops and Products, 47: 232-238. Tanwar, H., Sharma, S., Mor, VS. and Yadav, J. 2018. Image analysis: A modern approach to seed quality testing. Current Journal of Applied Science and Technology, 27(1): 1-11. Tu, K., Wen, S., Cheng, Y., Zhang, T., Pan, T., Wang, J., Wang, J. and Sun, Q. 2021. A non- destructive and highly efficient model for detecting the genuineness of maize variety ‘JINGKE 968’ using machine vision combined with deep learning. Computers and Electronics in Agriculture, 182: 106002. Vadivambal, R., and Jayas, DS. 2010. Applications of Thermal Imaging in Agriculture and Food Industry-A Review. Food and Bioprocess Technology, 4:186–199. Varma, VS., Kanaka, DK. and Keshavulu, K. 2013. Seed image analysis: its applications in seed science research. International Research Journal of Agricultural Sciences, 1(2): 30-36. Venkatesh, AS., Lokeshwaran, R. and Avinash, V. 2015. A reliable image processing based agri- products defect detection, analysis and sorter system. International Journal of Innovative Research in Science, Engineering and Technology, 4(10): 9695-9701. Vijaya Geetha, V., Balamurugan, P. and Bhaskaran, M. 2011. Characterization of Mustard Genotypes Through Image Analysis. Research Journal of Seed Science, 4: 192-198. Visen, NS., Paliwal, J., Jayas, DS. and White, NDG. 2004. Image analysis of bulk grain samples using neural networks. Canadian Biosystems Engineering, 46(7): 11-15. Vresak, M., Halkjaer Olesen, M., Gislum, R., Bavec, F. and Ravn Jergensen, J. 2016. The use of image spectroscopy technology as a diagnostic method for seed health testing and variety identification. PLoS ONE, 11(3): e0152011. Wang, X., Xie, Q., Shi, J. and Zhou, X. 2021. Cloud image analysis of temperature changes during bulk corn microbiological heating. International Journal of Food Properties, 24(1): 1777-1789. White, NDG. and Muir, WE. 2001. Microorganisms in stored grain. Winnipeg, Department of Bio systems Engineering, University of Manitoba, In Grain Preservation Biosystems: 28-42. Wilkins, D. 1983. Safe storage of wheat. Country Guide, 102(9): 30A, 30D. Zayas, I., Pomeranz, Y and Lai, FS. 1989. Discrimination of wheat and non-wheat components in grain samples by image analysis. Cereal Chemistry, 66(3): 233- 237. Zhang, C., Si, Y., Lamkey, J., Boydston, RA., Garland-Campell, KA. and Sankaran, S. 2018. High throughput phenotyping of seed/seedling evaluation using digital image analysis. Agronomy, 8(63): 1-14 file:///C:/user/Downloads/azojete143/www.azojete.com.ng mailto:ndubisi.aviara@unimaid.edu.ng mailto:nddyaviara@yahoo.com