Meat Texture Image Classification Using the Haar Wavelet Approach and a Gray-Level Co-Occurrence Matrix
Abstract
:1. Introduction
- Data Collection is the first stage, representing collecting texture images of beef, buffalo meat, goat meat, horse meat, and pork, using a digital camera.
- Sampling is the stage where the researcher selects samples from the images collected to be used as training data.
- Class Division is the stage where the images are grouped into classes (fresh, frozen, and rotten) based on the texture characteristics of the meat.
- Preprocessing is the stage before feature extraction, where the images need to be processed to remove noise or make other adjustments to produce better data.
- Feature Extraction is the stage that involves extracting Haar wavelet and GLCM features as input for the classification process.
- Dataset is the stage where the processed data and the extracted features are grouped (fresh, frozen, and rotten) into a dataset ready for the classification process.
- Classification is the stage where the classification model, such as k-NN is used to classify the images into predetermined classes.
- Calculate Similarity Distance is a stage, which is carried out in some cases after classification, and may be necessary to determine how similar the classified image is to images in the same class.
- Validation is the stage that involves evaluating the performance of the classification model to ensure that the model can classify images correctly and reliably.
- Confusion Matrix Results is the stage where the confusion matrix is used to display classification performance in more detail, showing how good the model is at classifying images into the correct classes.
2. Material and Method
2.1. Data Collection
2.2. Preprocessing
2.3. k-Nearest Neighbor (k-NN)
- The distance metric used to calculate the proximity between data points must be selected using the Euclidean distance.
- Using the Euclidean distance metric, the distance to each data point in the training dataset and each testing data point is to be determined.
- After calculating the distance, the next step is to find the k-NN and look at the k-NN of the test data points based on the most negligible distance value. Thereafter, the calculated distances are to be sorted and the lowest K value selected.
- The next step is to predict the class (classification) as a class prediction for the test data points; if the task involves classification, it should be ensured that the majority class is from the k-NN.
2.4. Wavelet Haar
- The intervals for texture photos of different types of meat are divided into smaller intervals. Convolution operations on adjacent intervals or the average of two consecutive values can achieve this.
- After separating the intervals, the approximation coefficient (A) and detail coefficient (D) are calculated. The approximation coefficient represents the finer details or low-frequency components in the texture image of a type of meat. The detail coefficient represents high-frequency elements or information that are coarser or change more quickly.
- Coefficient values are normalized to suit the needs of a particular use case. Adjusting scales or assigning weights can be part of this process.
- Wavelet Haar involves the decomposition of the original image into basic parts called approximation (coarse features) and detail (fine features).
- The original image is divided into two equal parts, after which the difference between the two parts is calculated to obtain the detail, while the average of the two parts results in an approximation.
- A histogram is a visual representation of the distribution of values in the data. The approximation histogram of Haar wavelets shows the frequency of appearance of approximation values after the Haar wavelet transform.
- Peaks in a histogram appear due to a distinctive structure or pattern in the data. In the context of Haar wavelets, these peaks may appear due to sudden changes in approximation values, which may be indicative of significant changes in the original image.
- The peaks in a Haar wavelet approximation histogram can provide information about important features in the data, such as sudden changes, the presence or absence of certain patterns, and the level of roughness or smoothness in the image.
- (a)
- If the original image has many sudden changes or small details, there will be many peaks in the approximation histogram of the Haar wavelet.
- (b)
- The resolution of the Haar wavelet transform also influences the number of peaks. The greater the resolution, the finer the details that can be detected, resulting in fewer peaks in the histogram.
- (c)
- Using different scales in the Haar wavelet transform can also affect the number of peaks in the histogram. The more varied the scales used, the more details are captured, resulting in more peaks.
2.5. Gray Level Co-Occurrence Matrix
- is the intensity of the image pixel at coordinates (m, n).
- returns one if the parenthetical statement is accurate, and 0 if otherwise.
- M is the number of image rows.
- N is the number of image columns.
- Select horizontal, vertical, and diagonal directions at a distance of 1.
- Count the pairs of pixels that occur together:
- Scan the image to identify pairs of pixels with matching intensities.
- Pairs of pixels that occur together include horizontal (1, 1), (1, 2), (2, 3), (3, 4), (2, 2), (3, 3), (4, 4), (1, 1), (1, 2), (2, 3), (3, 4), (2, 2), (3, 3), (4, 4), vertical (1, 1), (2, 2), (1, 1), (3, 4), (2, 2), (1, 1), (4, 4), (2, 2), (2, 2), (3, 3), (4, 4), (2, 2), (2, 2), (4, 4) and diagonals (1, 1), (1, 1), (2, 2), (3, 3), (2, 2), (3, 3), (4, 4), (1, 1), (1, 1), (2, 2), (3, 3), (2, 2), (3, 3), (4, 4).
- Create a GLCM
- Count the occurrences of pixel pairs and insert them into the GLCM.
(Horizontal) (Vertical) (Diagonal)
- GLCM Normalization:Normalize the matrix to obtain a probability distribution.
(Horizontal) (Vertical) (Diagonal)
- is the GLCM element for the intensity pairs and at a distance of and a direction of
- is the Kronecker delta function, with a value of 1 if the values in it are the same, and 0 if they are different.
- is the pixel intensity at the coordinate in the image.
- and is the shift in direction that determines the distance.
- Direction and Distance Selection
- 2.
- GLCM Calculation
- 3.
- Matrix Normalization
- 4.
- Feature Extraction from Matrix Normalization
- 5.
- Texture Statistics and Characteristics
2.6. System Implementation and Testing
- Number of samples and classification
- 2.
- Dataset division
- 3.
- Types of meat tested
- 4.
- Use of digital camera
- 5.
- Image size
- 6.
- Example of image acquisition results
- 7.
- Distribution of GLCM Values
2.7. Classification
2.8. Histogram
3. Results and Discussion
3.1. Experiment Results
3.2. Performance Evaluation of Classification Results
- True Positive (TP): The number of positive observations correctly predicted by the model.
- True Negative (TN): The number of negative observations correctly predicted by the model.
- False Positive (FP): The number of negative observations incorrectly predicted as positive by the model (Type I error).
- False Negative (FN): The number of positive observations incorrectly predicted as negative by the model (Type II error).
3.3. Validation
- True Positive (TP) is the number of positive cases identified as positive.
- True Negative (TN) is the number of negative cases correctly identified as negative.
- False Positive (FP) is the number of negative cases incorrectly identified as positive.
- True Positive (TP) is the number of positive cases correctly identified as positive.
4. Feature Selection Results
5. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Aisah, S.A.; Setyaningrum, A.H.; Wardhani, L.K.; Bahaweres, R. Identifying Pork Raw-Meat Based on Color and Texture Extraction Using Support Vector Machine. In Proceedings of the 2020 8th International Conference on Cyber and IT Service Management (CITSM), Pangkal Pinang, Indonesia, 23–24 October 2020. [Google Scholar] [CrossRef]
- Kiswanto; Hadiyanto; Sediyono, E. Modification of the Haar Wavelet Algorithm for Texture Identification of Types of Meat Using Machine; Springer Nature: Singapore, 2024. [Google Scholar] [CrossRef]
- Hanny Hikmayanti, H.; Madenda, S.; Widiyanto, S. Comparison of Beef Marbling Segmentation by Experts towards Computational Techniques by Using Jaccard, Dice and Cosine. Turk. J. Comput. Math. Educ. 2021, 12, 623–627. [Google Scholar]
- Handayani, H.H.; Masruriyah, A.F.N. Determination of beef marbling based on fat percentage for meat quality. Int. J. Psychosoc. Rehabil. 2020, 24, 8394–8401. [Google Scholar]
- Adi, K.; Pujiyanto, S.; Nurhayati, O.D.; Pamungkas, A. Beef quality identification using color analysis and k-nearest neighbor classification. In Proceedings of the 2015 4th International Conference on Instrumentation, Communications, Information Technology, and Biomedical Engineering (ICICI-BME), Bandung, Indonesia, 2–3 November 2015; pp. 180–184. [Google Scholar] [CrossRef]
- Uddin, S.M.K.; Hossain, M.A.M.; Chowdhury, Z.Z.; Johan, M.R.B. Short targeting multiplex PCR assay to detect and discriminate beef, buffalo, chicken, duck, goat, sheep and pork DNA in food products. Food Addit. Contam. Part A 2021, 38, 1273–1288. [Google Scholar] [CrossRef]
- Sciences, M.R.; Farag, M.; Alagawany, M.E.A. El-Hack, Ruchi Tiwari Ruchi Tiwari, Kuldeep Dhama Kuldeep Dhama. Review Article Identiication of Diferent Animal Species in Meat and Meat Products. Trends Adv. 2015, 3, 334–346. [Google Scholar]
- Dalsecco, L.S.; Palhares, R.M.; Oliveira, P.C.; Teixeira, L.V.; Drummond, M.G.; de Oliveira, D.A.A. A Fast and Reliable Real-Time PCR Method for Detection of Ten Animal Species in Meat Products. J. Food Sci. 2018, 83, 258–265. [Google Scholar] [CrossRef]
- Li, Y.; Liu, S.; Meng, F.; Liu, D.; Zhang, Y.; Wang, W.; Zhang, J. Comparative review and the recent progress in detection technologies of meat product adulteration. Compr. Rev. Food Sci. Food Saf. 2020, 19, 2256–2296. [Google Scholar] [CrossRef]
- Hossain, M.A.M.; Ali, E.; Sultana, S.; Asing; Bonny, S.Q.; Kader, A.; Rahman, M.A. Quantitative Tetraplex Real-Time Polymerase Chain Reaction Assay with TaqMan Probes Discriminates Cattle, Buffalo, and Porcine Materials in Food Chain. J. Agric. Food Chem. 2017, 65, 3975–3985. [Google Scholar] [CrossRef]
- Albkosh, F.M.; Hitam, M.S.; Yussof, W.N.J.H.W.; Hamid, A.A.K.A.; Ali, R. Optimization of discrete wavelet transform features using artificial bee colony algorithm for texture image classification. Int. J. Electron. Comput. Eng. 2019, 9, 5253–5262. [Google Scholar] [CrossRef]
- Sun, X.; Chen, K.; Maddock-Carlin, K.; Anderson, V.; Lepper, A.; Schwartz, C.; Keller, W.; Ilse, B.; Magolski, J.; Berg, E. Predicting beef tenderness using color and multispectral image texture features. Meat Sci. 2012, 92, 386–393. [Google Scholar] [CrossRef]
- Jackman, P.; Sun, D.W.; Allen, P.; Valous, N.A.; Mendoza, F.; Ward, P. Identification of important image features for pork and turkey ham classification using colour and wavelet texture features and genetic selection. Meat Sci. 2010, 84, 711–717. [Google Scholar] [CrossRef]
- Ávila, M.; Durán, M.; Caballero, D.; Antequera, T.; Palacios-Pérez, T.; Cernadas, E.; Fernández-Delgado, M. Magnetic Resonance Imaging, texture analysis and regression techniques to non-destructively predict the quality characteristics of meat pieces. Eng. Appl. Artif. Intell. 2019, 82, 110–125. [Google Scholar] [CrossRef]
- Zeng, S.; Chen, L.; Jiang, L.; Gao, C. Hyperspectral imaging technique based on Geodesic K-medoids clustering and Gabor wavelets for pork quality evaluation. Int. J. Wavelets Multiresolution Inf. Process. 2017, 15, 1750066. [Google Scholar] [CrossRef]
- Wijaya, D.R. Noise filtering framework for electronic nose signals: An application for beef quality monitoring. Comput. Electron. Agric. 2019, 157, 305–321. [Google Scholar] [CrossRef]
- Kishore, M.; Issac, A.; Minhas, N.; Sarkar, B. Image processing based method to assess fish quality and freshness. J. Food Eng. 2016, 177, 50–58. [Google Scholar] [CrossRef]
- Pu, H.; Xie, A.; Sun, D.W.; Kamruzzaman, M.; Ma, J. Application of Wavelet Analysis to Spectral Data for Categorization of Lamb Muscles. Food Bioprocess Technol. 2014, 8, 1–16. [Google Scholar] [CrossRef]
- Masoumi, M.; Marcoux, M.; Maignel, L.; Pomar, C. Weight prediction of pork cuts and tissue composition using spectral graph wavelet. J. Food Eng. 2021, 299, 110501. [Google Scholar] [CrossRef]
- Wijaya, D.R.; Sarno, R.; Zulaika, E.; Sabila, S.I. Development of mobile electronic nose for beef quality monitoring. Procedia Comput. Sci. 2017, 124, 728–735. [Google Scholar] [CrossRef]
- Song, K.; Wang, S.H.; Yang, D.; Shi, T.Y. Combination of spectral and image information from hyperspectral imaging for the prediction and visualization of the total volatile basic nitrogen content in cooked beef. J. Food Meas. Charact. 2021, 15, 4006–4020. [Google Scholar] [CrossRef]
- Sujana, I.G.; Putra, E. Classification of Tuna Meat Grade Quality Based on Color Space Using Wavelet and k-Nearest Neighbor Algorithm. In Proceedings of the 2023 International Conference on Smart-Green Technology in Electrical and Information Systems (ICSGTEIS), Bali, Indonesia, 2–4 November 2023; pp. 2–4. [Google Scholar]
- Amin, V.; Wilson, D.; Rouse, G.; Udpa, S. Multiresoi, Utional Texture Analysis for Ultrasound Tissue. Nondestructive Testing and Evaluation. 1998, 14, 201–215. [Google Scholar]
- Tao, Y. Wavelet-based adaptive thresholding method for image segmentation. Opt. Eng. 2001, 40, 868. [Google Scholar] [CrossRef]
- Kim, N.D.; Amin, V.; Wilson, D.; Rouse, G.; Udpa, S. Ultrasound image texture analysis for characterizing intramuscular fat content of live beef cattle. Ultrason. Imaging 1998, 20, 191–205. [Google Scholar] [CrossRef]
- Asmara, R.A.; Romario, R.; Batubulan, K.S.; Rohadi, E.; Siradjuddin, I.; Ronilaya, F.; Ariyanto, R.; Rahmad, C.; Rahutomo, F. Classification of pork and beef meat images using extraction of color and texture feature by Grey Level Co-Occurrence Matrix method. IOP Conf. Ser. Mater. Sci. Eng. 2018, 434, 012072. [Google Scholar] [CrossRef]
- Widiyanto, S. Texture Feature Extraction Based On GLCM and DWT for Beef Tenderness Classification. In Proceedings of the 2018 Third International Conference on Informatics and Computing (ICIC), Palembang, Indonesia, 17–18 October 2018; pp. 1–4. [Google Scholar]
- Asmara, R.A.; Hasanah, Q.; Rahutomo, F.; Rohadi, E.; Siradjuddin, I.; Ronilaya, F.; Handayani, A.N. Chicken meat freshness identification using colors and textures feature. In Proceedings of the 2018 Joint 7th International Conference on Informatics, Electronics & Vision (ICIEV) and 2018 2nd International Conference on Imaging, Vision & Pattern Recognition (icIVPR), Kitakyushu, Japan, 25–29 June 2018; pp. 93–98. [Google Scholar] [CrossRef]
- Santoni, M.M.; Sensuse, D.I.; Arymurthy, A.M.; Fanany, M.I. Cattle Race Classification Using Gray Level Co-occurrence Matrix Convolutional Neural Networks. Procedia Comput. Sci. 2015, 59, 493–502. [Google Scholar] [CrossRef]
- Ibrahim, N.M. Muzzle feature extraction based on gray level co-occurrence matrix. Int. J. Vet. Med. 2016, 1, 16–24. [Google Scholar]
- Farinda, R.; Firmansyah, Z.; Sulton, C.; Wijaya, I.G.P.S.; Bimantoro, F. Beef Quality Classification based on Texture and Color Features using SVM Beef Quality Classification based on Texture and Color Features using SVM Classifier. J. Telemat. Informatics 2018, 6, 201–213. [Google Scholar] [CrossRef]
- Agustin, S.; Dijaya, R. Beef Image Classification using K-Nearest Neighbor Algorithm for Identification Quality and Freshness. J. Phys. Conf. Ser. 2019, 1179, 012184. [Google Scholar] [CrossRef]
- Jia, B.; Wang, W.; Yoon, S.C.; Zhuang, H.; Li, Y.F. Using a combination of spectral and textural data to measure water-holding capacity in fresh chicken breast fillets. Appl. Sci. 2018, 8, 343. [Google Scholar] [CrossRef]
- Suhadi, S.; Atika, P.D.; Sugiyatno, S.; Panogari, A.; Handayanto, R.T.; Herlawati, H. Mobile-based fish quality detection system using k-nearest neighbors method. In Proceedings of the 2020 Fifth International Conference on Informatics and Computing (ICIC), Gorontalo, Indonesia, 3–4 November 2020. [Google Scholar] [CrossRef]
- Yudhana, A.; Umar, R.; Saputra, S. Fish Freshness Identification Using Machine Learning: Performance Comparison of k-NN and Naïve Bayes Classifier. J. Comput. Sci. Eng. 2022, 16, 153–164. [Google Scholar] [CrossRef]
- Jiang, H.; Yuan, W.; Ru, Y.; Chen, Q.; Wang, J.; Zhou, H. Feasibility of identifying the authenticity of fresh and cooked mutton kebabs using visible and near-infrared hyperspectral imaging. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2022, 282, 121689. [Google Scholar] [CrossRef]
- Barbon, A.P.A.d.C.; Barbon, S.; Campos, G.F.C.; Seixas, J.L.; Peres, L.M.; Mastelini, S.M.; Andreo, N.; Ulrici, A.; Bridi, A.M. Development of a flexible Computer Vision System for marbling classification. Comput. Electron. Agric. 2017, 142, 536–544. [Google Scholar] [CrossRef]
- Sabilla, S.I.; Sarno, R.; Triyana, K.; Hayashi, K. Deep learning in a sensor array system based on the distribution of volatile compounds from meat cuts using GC–MS analysis. Sens. Bio-Sens. Res. 2020, 29, 100371. [Google Scholar] [CrossRef]
- Matera, J.; Cruz, A.; Raices, R.; Silva, M.; Nogueira, L.; Quitério, S.; Cavalcanti, R.N.; Freiras, M.; Júnior, C.C. Discrimination of Brazilian artisanal and inspected pork sausages: Application of unsupervised, linear and non-linear supervised chemometric methods. Food Res. Int. 2014, 64, 380–386. [Google Scholar] [CrossRef]
- Gaber, T.; Tharwat, A.; Hassanien, A.E.; Snasel, V. Biometric cattle identification approach based on Weber’s Local Descriptor and AdaBoost classifier. Comput. Electron. Agric. 2016, 122, 55–66. [Google Scholar] [CrossRef]
- Xiong, Y.; Li, Y.; Wang, C.; Shi, H.; Wang, S.; Yong, C.; Gong, Y.; Zhang, W.; Zou, X. Non-Destructive Detection of Chicken Freshness Based on Electronic Nose Technology and Transfer Learning. Agriculture 2023, 13, 496. [Google Scholar] [CrossRef]
- González-Mohino, A.; Pérez-Palacios, T.; Antequera, T.; Ruiz-Carrascal, J.; Olegario, L.S.; Grassi, S. Monitoring the processing of dry fermented sausages with a portable NIRS device. Foods 2020, 9, 1294. [Google Scholar] [CrossRef]
- Varghese, A.; Jain, S.; Jawahar, M.; Prince, A.A. Auto-pore segmentation of digital microscopic leather images for species identification. Eng. Appl. Artif. Intell. 2023, 126, 107049. [Google Scholar] [CrossRef]
- Fernández-Ibáñez, V.; Fearn, T.; Soldado, A.; de la Roza-Delgado, B. Development and validation of near infrared microscopy spectral libraries of ingredients in animal feed as a first step to adopting traceability and authenticity as guarantors of food safety. Food Chem. 2010, 121, 871–877. [Google Scholar] [CrossRef]
- Kumar, S.; Singh, S.K.; Singh, R.; Singh, A.K. Animal Biometrics: Techniques and Applications; Springer: Berlin/Heidelberg, Germany, 2018; pp. 1–243. [Google Scholar] [CrossRef]
- Chen, T.; Qi, X.; Chen, M.; Chen, B. Gas Chromatography-Ion Mobility Spectrometry Detection of Odor Fingerprint as Markers of Rapeseed Oil Refined Grade. J. Anal. Methods Chem. 2019, 2019, 3163204. [Google Scholar] [CrossRef]
- Hasan, N.U.; Ejaz, N.; Ejaz, W.; Kim, H.S. Meat and fish freshness inspection system based on odor sensing. Sensors 2012, 12, 15542–15557. [Google Scholar] [CrossRef] [PubMed]
- Shik, A.V.; Sobolev, P.V.; Zubritskaya, Y.V.; Baytler, M.O.; Stepanova, I.A.; Chernyaev, A.P.; Borschegovskaya, P.Y.; Zolotov, S.A.; Doroshenko, I.A.; Podrugina, T.A.; et al. Rapid testing of irradiation dose in beef and potatoes by reaction-based optical sensing technique. J. Food Compos. Anal. 2024, 127, 105946. [Google Scholar] [CrossRef]
- Jiang, R.; Shen, J.; Li, X.; Gao, R.; Zhao, Q.; Su, Z. Detection and recognition of veterinary drug residues in beef using hyperspectral discrete wavelet transform and deep learning. Int. J. Agric. Biol. Eng. 2022, 15, 224–232. [Google Scholar] [CrossRef]
- Malegori, C.; Franzetti, L.; Guidetti, R.; Casiraghi, E.; Rossi, R. GLCM, an image analysis technique for early detection of bio fi lm. J. Food Eng. 2016, 185, 48–55. [Google Scholar] [CrossRef]
- Parsania, P.S.; Virparia, P.V. A Review: Image Interpolation Techniques for Image Scaling. Int. J. Innov. Res. Comput. Commun. Eng. 2014, 2, 7409–7414. [Google Scholar] [CrossRef]
- Fedorov, E.; Utkina, T.; Nechyporenko, O.; Korpan, Y. Development of technique for face detection in image based on binarization, scaling and segmentation methods. East. -Eur. J. Enterp. Technol. 2020, 1, 23–31. [Google Scholar] [CrossRef]
- DeCarli, C.; Murphy, D.G.M.; Teichberg, D.; Campbell, G.; Sobering, G.S. Local histogram correction of MRI spatially dependent image pixel intensity nonuniformity. J. Magn. Reson. Imaging 1996, 6, 519–528. [Google Scholar] [CrossRef]
- Bae, S.H.; Kim, M. A novel SSIM index for image quality assessment using a new luminance adaptation effect model in pixel intensity domain. In Proceedings of the 2015 Visual Communications and Image Processing (VCIP), Singapore, 13–16 December 2015; pp. 5–8. [Google Scholar] [CrossRef]
- Jakubek, J. Data processing and image reconstruction methods for pixel detectors. Nucl. Instrum. Methods Phys. Res. Sect. A Accel. Spectrometers Detect. Assoc. Equip. 2007, 576, 223–234. [Google Scholar] [CrossRef]
- Wu, H.; Li, Z. Scale Issues in Remote Sensing: A Review on Analysis, Processing and Modeling. Sensors 2009, 9, 1768–1793. [Google Scholar] [CrossRef]
- Yang, Y.; Wang, W.; Zhuang, H.; Yoon, S.C.; Jiang, H. Fusion of spectra and texture data of hyperspectral imaging for the prediction of the water-holding capacity of fresh chicken breast filets. Appl. Sci. 2018, 8, 640. [Google Scholar] [CrossRef]
- Park, B.; Kise, M.; Windham, W.R.; Lawrence, K.C.; Yoon, S.C. Textural analysis of hyperspectral images for improving contaminant detection accuracy. Sens. Instrum. Food Qual. Saf. 2008, 2, 208–214. [Google Scholar] [CrossRef]
- Ali, N.; Neagu, D.; Trundle, P. Evaluation of k-nearest neighbour classifier performance for heterogeneous data sets. SN Appl. Sci. 2019, 1, 1559. [Google Scholar] [CrossRef]
- Gallego, A.J.; Rico-juan, J.R.; Valero-mas, J.J. Efficient k-nearest neighbor search based on clustering and adaptive k values. Pattern Recognit. 2021, 122, 108356. [Google Scholar] [CrossRef]
- Africa, A.M.D.; Alberto, S.T.C.; Tan, T.Y.E. Development of a portable electronic device for the detection and indication of fireworks and firecrackers for security personnel. Indones. J. Electr. Eng. Comput. Sci. 2020, 19, 1194–1203. [Google Scholar] [CrossRef]
- Wijaya, D.R.; Sarno, R.; Zulaika, E. DWTLSTM for electronic nose signal processing in beef quality monitoring. Sens. Actuators B Chem. 2021, 326, 128931. [Google Scholar] [CrossRef]
- Ayaz, H.; Ahmad, M.; Mazzara, M.; Sohaib, A. Hyperspectral imaging for minced meat classification using nonlinear deep features. Appl. Sci. 2020, 10, 7783. [Google Scholar] [CrossRef]
1. | Input: take a grayscale image from the input image. |
2. | Read: divide the image into 2 × 2 sub-blocks for each sub-block. |
3. | Read: calculate the average of pixels in sub-blocks (approximation components), and calculate horizontal, vertical, and diagonal details. |
4. | Original Detail Horizontal = top-left pixels—average |
5. | Original Detail Vertical = top-right pixel—average |
6. | Original Detail Diagonal = bottom-left pixels—average |
7. | Combine all the average values to create an approximation coefficient (cA) component. |
8. | Combine all the horizontal detail values to create a detail horizontal coefficient (cH) component. |
9. | Combine all the vertical detail values to create a vertical detail coefficient (cV) component. |
10. | Combine all the detail diagonal values to create a detail diagonal coefficient (cD) component. |
11. | Return cA, cH, cV, and cD as the result of the Haar wavelet transform |
No. | Type of Meat | Feature Subsets | Sample |
---|---|---|---|
1 | Beef | Fresh Beef | 50 |
Frozen Beef | 50 | ||
Rotten Beef | 50 | ||
2 | Buffalo | Fresh Buffalo Meat | 50 |
Frozen Buffalo Meat | 50 | ||
Rotten Buffalo Meat | 50 | ||
3 | Goat | Fresh Goat Meat | 50 |
Frozen Goat Meat | 50 | ||
Rotten Goat Meat | 50 | ||
4 | Horse | Fresh Horse Meat | 50 |
Frozen Horse Meat | 50 | ||
Rotten Horse Meat | 50 | ||
5 | Pork | Fresh Pork | 50 |
Frozen Pork | 50 | ||
Rotten Pork | 50 |
Classification | |||
---|---|---|---|
Positive Prediction | Negative Prediction | ||
Actual Classification | Actual Positive | True Positive (TP) | False Negative (FN) |
Actual Negative | False Positive (FP) | True Negative (TN) |
File | Class | Results of Sampling Types of Meat | |
---|---|---|---|
Beef | Image | Histogram | |
| |||
| |||
| |||
Buffalo |
| ||
| |||
| |||
Goat |
| ||
| |||
| |||
Horse |
| ||
| |||
| |||
Pork |
| ||
| |||
|
Type of Meat | Class | GLCM Metrics | Minimum | Maximum | Average | ||||
---|---|---|---|---|---|---|---|---|---|
Contrast | Correlation | Energy | Homogeneity | Entropy | |||||
Beef | Fresh Beef | 686.14 | 0.466 | 0.016 | 0.055 | −72.23 | −72.23 | 686.14 | 122.89 |
Frozen Beef | 552.35 | 0.454 | 0.014 | 0.063 | −72.15 | −72.15 | 552.35 | 96.15 | |
Rotten Beef | 651.1 | 0.86 | 0.014 | 0.058 | −73.09 | −73.09 | 651.1 | 115.79 | |
Buffalo | Fresh Buffalo Meat | 656.57 | 0.68 | 0.01 | 0.056 | −72.66 | −72.66 | 656.57 | 116.93 |
Frozen Buffalo Meat | 551.83 | 0.644 | 0.012 | 0.056 | −73.53 | −73.53 | 551.83 | 95.80 | |
Rotten Buffalo Meat | 583.98 | 0.056 | 0.018 | 0.053 | −72.43 | −72.43 | 583.98 | 102.33 | |
Goat | Fresh Goat Meat | 988.17 | 0.28 | 0.015 | 0.056 | −72.48 | −72.48 | 988.17 | 183.21 |
Frozen Goat Meat | 999.097 | 0.474 | 0.012 | 0.05 | −70.90 | −70.90 | 999.097 | 185.75 | |
Rotten Goat Meat | 545.43 | 0.304 | 0.017 | 0.064 | −71.60 | −71.60 | 545.43 | 94.84 | |
Horse | Fresh Horse Meat | 716.54 | 0.278 | 0.012 | 0.055 | −72.82 | −72.82 | 716.54 | 128.81 |
Frozen Horse Meat | 624.06 | 0.488 | 0.013 | 0.06 | −73.25 | −73.25 | 624.06 | 110.28 | |
Rotten Horse Meat | 458.32 | 0.332 | 0.02 | 0.079 | −72.17 | −72.17 | 458.32 | 77.32 | |
Pork | Fresh Pork | 329.53 | 0.376 | 0.025 | 0.056 | −72.37 | −72.37 | 329.53 | 51.52 |
Frozen Pork | 462.78 | 0.392 | 0.024 | 0.051 | −71.99 | −71.99 | 462.78 | 78.25 | |
Rotten Pork | 244.98 | 0.34 | 0.029 | 0.064 | −72.30 | −72.30 | 244.98 | 34.62 |
Number of Neighbors (k) | Class | Sensitivity | Specificity | Accuracy | Matthews Correlation Coefficient |
---|---|---|---|---|---|
1 | Fresh Beef | 98.039% | 100% | 99% | 98.02% |
Frozen Beef | 96.154% | 100% | 98% | 96.077% | |
Rotten Beef | 94.231% | 97.917% | 96% | 92.074% | |
2 | Fresh Buffalo Meat | 97.959% | 96.078% | 97% | 94.019% |
Frozen Buffalo Meat | 96.078% | 97.959% | 97% | 94.019% | |
Rotten Buffalo Meat | 92.308% | 95.833% | 94% | 88.07% | |
3 | Fresh Goat Meat | 100% | 98.039% | 99% | 98.02% |
Frozen Goat Meat | 98% | 98% | 98% | 98% | |
Rotten Goat Meat | 96% | 96% | 96% | 92% | |
4 | Fresh Horse Meat | 100% | 98.939% | 99% | 98.02% |
Frozen Horse Meat | 96.154% | 100% | 98% | 96.077% | |
Rotten Horse Meat | 94.118% | 95.918% | 95% | 90.018% | |
5 | Fresh Pork | 98% | 98% | 98% | 96% |
Frozen Pork | 100% | 98.039% | 99% | 98.02% | |
Rotten Pork | 94.231% | 97.917% | 96% | 92.074% |
File | Class | k-NN Accuracy % | Haar Wavelet Accuracy % | GLCM Accuracy % |
---|---|---|---|---|
Beef | Fresh Beef | 99 | 89.96 | 122.89 |
Frozen Beef | 98 | 88.25 | 96.15 | |
Rotten Beef | 96 | 87.97 | 115.79 | |
Buffalo | Fresh Buffalo Meat | 97 | 89.75 | 116.93 |
Frozen Buffalo Meat | 97 | 87.96 | 95.80 | |
Rotten Buffalo Meat | 94 | 86.88 | 102.33 | |
Goat | Fresh Goat Meat | 99 | 89.47 | 183.21 |
Frozen Goat Meat | 98 | 86.73 | 185.75 | |
Rotten Goat Meat | 96 | 86.79 | 94.84 | |
Horse | Fresh Horse Meat | 99 | 89.85 | 128.81 |
Frozen Horse Meat | 98 | 87.56 | 110.28 | |
Rotten Horse Meat | 95 | 86.26 | 77.32 | |
Pork | Fresh Pork | 98 | 89.25 | 51.52 |
Frozen Pork | 99 | 87.67 | 78.25 | |
Rotten Pork | 96 | 86.36 | 34.62 |
Author | Structure | Texture Analysis Method (Features) | Method | Accuracy (%) |
---|---|---|---|---|
Yudhana, Anton Umar, Rusydi Saputra, Sabarudin [36] | Fish | RGB colors and GLCM features | k-NN | 94% |
Don Africa, Aaron M Claire Alberto, Stephanie T Evan Tan, Travis Y [61] | Beef and pork | Skewness, Kurtosis, Mean, and Std Deviation | k-NN | 98.6% |
Wijaya, Dedy Rahman Sarno, Riyanarto Zulaika, Enny [62] | Beef | Regression results (black: actual, blue: prediction, red: prediction with error) | Discrete Wavelets Transform and Long Short-Term Memory (DWTLSTM) dan k-nearest neighbor (k-NN) | 85.05% |
Kiswanto, Hadiyanto, and Eko Sediyon [2] | Beef, buffalo, goat, horse and pork | RGB, GLCM, and HSV | Haar wave algorithm | 76.72% |
Ayaz, Hamail Ahmad, Muhammad Mazzara, Manuel Sohaib, Ahmed [63] | Meat | HSI | k-NN | 82% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kiswanto, K.; Hadiyanto, H.; Sediyono, E. Meat Texture Image Classification Using the Haar Wavelet Approach and a Gray-Level Co-Occurrence Matrix. Appl. Syst. Innov. 2024, 7, 49. https://doi.org/10.3390/asi7030049
Kiswanto K, Hadiyanto H, Sediyono E. Meat Texture Image Classification Using the Haar Wavelet Approach and a Gray-Level Co-Occurrence Matrix. Applied System Innovation. 2024; 7(3):49. https://doi.org/10.3390/asi7030049
Chicago/Turabian StyleKiswanto, Kiswanto, Hadiyanto Hadiyanto, and Eko Sediyono. 2024. "Meat Texture Image Classification Using the Haar Wavelet Approach and a Gray-Level Co-Occurrence Matrix" Applied System Innovation 7, no. 3: 49. https://doi.org/10.3390/asi7030049
APA StyleKiswanto, K., Hadiyanto, H., & Sediyono, E. (2024). Meat Texture Image Classification Using the Haar Wavelet Approach and a Gray-Level Co-Occurrence Matrix. Applied System Innovation, 7(3), 49. https://doi.org/10.3390/asi7030049