Journal of Researches in Mechanics of Agricultural Machinery

Journal of Researches in Mechanics of Agricultural Machinery

Implementation of a hyperspectral image processing algorithm for quality assessment of powder products

Document Type : Original Article

Authors
1 Department of Biosystems Engineering, Bu-Ali Sina University, Hamadan, Iran
2 Department of Biosystems Engineering, Ilam University, Ilam, Iran
Abstract
Introduction
Food stability is also a major concern in the food industry. Low-moisture products are generally more stable but are often supplied in powdered form, which poses challenges such as changes in ingredient functionality, separation of food components, particle adhesion, heterogeneity, and contamination by biological and chemical agents. however, some individuals deliberately add cheaper substances to increase profits. Laboratory methods such as high-performance liquid chromatography, capillary electrophoresis, and fluorescence spectroscopy are used to detect unauthorized additives or food fraud. These methods are time-consuming, costly, and require skilled analysts due to multiple steps like sample extraction, pretreatment, and data analysis. Therefore, employing rapid, simple, cost-effective, and non-destructive methods for quality control in the food supply chain is emphasized. One of the emerging techniques in the food industry is imaging technology, which has improved product quality and reduced production costs in agriculture and industry. Hyperspectral imaging is a novel method that captures detailed spectral information from different regions of samples across visible to near-infrared wavelengths, enabling detection of features invisible to conventional visible imaging. This technology has diverse applications in agriculture and food sectors and has been used to detect contamination, spoilage, and fraud in products like wheat, citrus fruits, rice, pistachios, and spices. Red chili powder is widely used as a spice in various foods. Since cheaper substances such as wheat flour, chickpea flour, and sea foam are often used as adulterants in spices, the present study aims to implement hyperspectral imaging technology to identify these materials in red chili powder.

Method
This study aimed to detect adulteration in red chili powder using hyperspectral imaging and machine learning algorithms. Red chili powder samples were prepared with impurities including chickpea flour, wheat flour, and sea foam powder at five different levels (0%, 5%, 15%, 30%, and 50%). Hyperspectral images were captured in the wavelength range of 400 to 950 nm using the imaging system at Ilam University. For each adulteration level, 18 images were recorded. During processing, effective channels were selected using Principal Component Analysis, and features such as mean, median, minimum, maximum, variance, and standard deviation were extracted from these channels. These selected features were then classified using a support vector machine algorithm with a Gaussian kernel. The model was trained on 80% of the data and tested on the remaining 20%. To evaluate the model’s performance, two strategies one-vs-one and one-vs-all were used.

Results
In this study, the first and second principal component (PC1 and PC2) plots were constructed to identify the most informative spectral channels among the 665 hyperspectral bands of red chili powder adulterated with chickpea flour, sea foam powder, and wheat flour. These principal component analysis plots were used as an effective dimensionality reduction tool to extract hidden patterns and enhance the interpretability of the hyperspectral data. The selection of key channels was based on their high loading values and their ability to discriminate among different levels of adulteration. For chili powder adulterated with chickpea flour, the most effective channels were identified as 158, 283, 369, 477, 587, and 605. In the case of sea foam powder, channels 133, 251, 275, 477, 500, and 566 were considered the most informative. For wheat flour adulteration, the relevant channels were 144, 251, 370, 478, 551, and 617. The corresponding effective wavelengths for chickpea flour were 530.22, 633.57, 704.68, 793.98, 844.93, and 899.81 nm. For sea foam powder, the selected wavelengths included 509.55, 607.11, 626.96, 769.17, 813.00, and 867.57 nm, while for wheat flour the effective wavelengths were 518.4, 607.11, 705.51, 794.81, 855.17, and 909.74 nm. These spectral regions demonstrated clear differences between adulteration levels and were thus selected for feature extraction. From the total set of extracted spectral features, only a limited number were identified as effective for classification purposes. Specifically, 12 features were selected for chickpea flour detection, 10 for wheat flour, and 12 for sea foam powder. All other non-contributing features were excluded to reduce noise and improve model accuracy. To assess classification performance, confusion matrices were generated using a support vector machine (SVM) classifier under two strategies: one-vs-one and one-vs-all. The results revealed that the one-vs-one approach achieved classification accuracies of 95.55%, 97.77%, and 95.55% for chickpea flour, wheat flour, and sea foam powder adulteration, respectively. Meanwhile, the one-vs-all strategy yielded a consistent overall classification accuracy of 88.88%. These findings confirm that hyperspectral imaging, combined with PCA-based channel selection and support vector machine classification, offers a reliable and non-destructive method for detecting adulterants in red chili powder with high precision.


Conclusions
The results of this study demonstrate the high capability of hyperspectral imaging technology combined with the Support Vector Machine classification method using a one-vs-one strategy in detecting adulterants such as wheat flour, chickpea flour, and sea foam powder in red chili powder. Compared to conventional laboratory methods, this approach offers advantages including non-destructiveness, high speed, and lower cost. Additionally, the developed image processing algorithm showed strong performance in quantifying the level of adulteration in red chili powder. Since the primary objective of this study was to detect adulteration levels individually, it is recommended that future research explore the system’s ability to identify various types of adulteration. Moreover, employing other data mining techniques such as deep learning could further enhance the accuracy in detecting both the types and amounts of adulteration. Ultimately, the proposed method has the potential to be applied for detecting other forms of adulteration in red chili powder as well.

Author Contributions
M.H. Nargesi: Conceptualization, investigation, software, formal analysis, data curation, writing original draft preparation, J. Amiri Paryan: Investigation, software, resources, writing review and editing, and K. Kheiralipour: Methodology, software, resources, writing review and editing.

Data Availability Statement
All information and results are presented in the text of the article.

Acknowledgements
We would like to thank Bu-Ali Sina University of Hamadan for supporting this research. We would also like to thank Ilam University for providing the necessary conditions for conducting this research.

Ethical Considerations
The authors have observed ethical principles in conducting and publishing this scientific work, and this is confirmed by all of them.
Keywords

Subjects