|
|
|
|
|
Universidade Federal de Santa Maria
Ci. e Nat., Santa Maria, v. 47, e86097, 2025
DOI: 10.5902/2179460X86097
ISSN 2179-460X
Submitted: 12/12/2023 • Approved: 24/01/2025 • Published: 01/04/2025
Biology-Botany
Computer vision-based wood identification: an approach with LPQ and GLCM descriptors integrated with Ensemble classification
Identificação madeira baseada em visão computacional: uma abordagem com descritores LPQ e GLCM integrados a classificação Ensemble
Márcio José Moutinho da PonteI
I Universidade Federal do Oeste do Pará, Santarém, PA, Brasil
II Fundação de Estudos Agrários Luiz de Queiroz, Piracicaba, SP, Brasil
ABSTRACT
Given the recognized relevance of botanical identification for forest management and biodiversity conservation, this paper proposes the identification of plant species wood anatomy using computer vision techniques. Microscopic images of 30 species were sourced from the Forest Species Database and captured using an Olympus CX40 microscope at 100x magnification, ensuring high detail. Pre-processing techniques, including normalization and feature extraction, were applied to enhance texture and color characteristics. Statistical, structural, and spectral descriptors such as LBPHF 24,3 and the combination of LPQ and GLCM (GHS) were utilized. These descriptors were analyzed with MATLAB and classified using robust methods, including Ensemble classifiers. Cross-validation ensured reliability, and results achieved assertiveness rates of 96.7% and 99.3% for LBPHF and LPQ-GLCM combinations, respectively. This study demonstrates the effectiveness of automated methods in enhancing botanical identification processes, offering precise and efficient tools for forest management and biodiversity conservation.
Keywords: Botanical identification; Texture descriptors; Pattern recognition; Computer vision; Ensemble classification
RESUMO
Dada a reconhecida relevância da identificação botânica para o manejo florestal e preservação da biodiversidade, o presente trabalho propõe a identificação da anatomia da madeira de espécies vegetais utilizando técnicas de visão computacional. Imagens microscópicas de 30 espécies foram extraídas do banco Forest Species Database e capturadas com um microscópio Olympus CX40 a 100x de aumento, garantindo alta qualidade. As operações de pré-processamento foram realizadas para destacar características de textura e cor, incluindo normalização e extração de atributos. Foram utilizados descritores estatísticos, estruturais e espectrais, como LBPHF 24,3 e a combinação de LPQ e GLCM (GHS). A análise foi feita no MATLAB, e os dados foram classificados com métodos robustos, incluindo o classificador Ensemble. A validação cruzada foi empregada para assegurar a confiabilidade dos modelos. Como resultado, alcançou-se uma assertividade de 96,7% para LBPHF e 99,3% para a combinação LPQ-GLCM. Este estudo destaca o potencial de métodos automatizados para aprimorar a identificação botânica, tornando-a mais precisa e eficiente, com aplicações promissoras no manejo florestal e conservação da biodiversidade.
Palavras-chave: Identificação botânica; Descritores de textura; Reconhecimento de padrões; Visão computacional; Classificação Ensemble
The use of Amazonian natural resources for Amazon region development requires the sustainable use of such riches and it can be achieved through sustainable management plans that consider the ecological, socio-cultural, and economic characteristics of the region (Ribeiro, Da Fonseca, & Pereira, 2020). Botanical identification is an essential step for avoiding fraud in forest management (Ferreira et al., 2020), illegal trade, and forest preservation through the identification of extinct species.
Currently, taxonomist botanists empirically conduct this process. However, given the scarcity of specialized professionals, the identification ends up being conducted by natives with knowledge of the forest, the bushmen (parataxonomists) (De Paula, 2012; Tou, Lau, & Tay, 2007; Ponte, 2017).
These natives adopt popular names of the species that, in addition to differing from the scientific names, may also present regional differences (Martins-Da-Silva, 2002), thus, inconsistency in botanical identification can lead to a reduction in biodiversity, devaluation of the wood product, financial loss in wood commercial transactions for domestic markets and export and in the exploitation of rare and endangered species (Ponte, 2017; Vieira, 2022).
It is believed that with the perspective of pattern recognition, artificial intelligence techniques, and computer vision, there may be an increase in the accuracy of the botanical identification process, thus helping to fill the gaps of taxonomist botanists. Computer vision systems have wide applicability, such as botanical, people, signatures, and objects recognition, and guiding robots (Azevedo, Conci, & Leta, 2007). Image Analysis (IA) is extracting significant information from images, mainly through digital processing techniques (Solomon & Breckon, 2011). The significant information obtained by IA is the image descriptors and feature extraction techniques are used to obtain them. Gonzalez & Woods (2000) group the main feature extraction techniques based on the approach, which can be: Statistical, Structural, and Spectral. The classification, in particular, starts from the premise that the similarity between objects implies that they have similar characteristics, forming classes (Ponte, 2017). Certain difficulties may arise during the classification process, some species have very similar patterns to each other and some species have a large intraclass texture variation (De Paula, 2012).
Among the visual information that can be extracted from wood images, the texture is an appropriate feature for the identification of forest species (De Paula, 2012), as it is the most important visual feature for the identification of homogeneous structures (Tuceryan & Jain, 1993), as it represents the surface and structure of an object through its properties. Texture can be enhanced through color features, which is a stable property, insensitive to rotation, scale and/or other types of deformation (Maenpaa, 2003; Yu, Cao, Liu, & Luo, 2009).
In this context, this work aimed to extract a combination of texture descriptors in wood images. The texture descriptors were analyzed through classifiers to determine the existence of pattern recognition in forest species by the anatomical characteristics of the wood exposed by the descriptors.
Botanical identification is a fundamental task for forest management, but it is still carried out by hand, which can lead to inconsistencies and take more time to identify species (Martins-da-Silva 2002). Due to the great challenge of ensuring confidence in the identification of plant species, especially when dealing with species that are very similar to each other, numerous researchers have dedicated efforts to develop technological solutions to perform botanical identification with high accuracy and efficiency.
In a recent study, Veras et al. (2022) mapped Amazonian tree species from RGB images captured by a low-cost unmanned aircraft system and Convolutional Neural Networks (CNN). The identification was done through the tree crowns that were outlined individually in each image obtained, the images were captured in different seasons of the year. From the training of the CNN model, they observed that the images in the rainy season generated higher classification accuracy than in the dry season. Thus, they fused images from different seasons, generating an average increase of 21.1 percentage points in the classification of species and reaching 90.5% accuracy.
Another study, that of Vieira et al. (2022), carried out the identification of commercially traded Amazonian wood species using a wood image pattern recognition system, intending to increase the accuracy and efficiency of current methods. In all, twenty images of each of the ten different species were used, with three polishing treatments. For image recognition, they established the use of textural segmentation associated with Haralick’s features and classified them by Artificial Neural Networks. With this they developed a model based on linear regression that achieved during training 94% accuracy in recognition, and in post-training for wood treated with sandpaper, a 65% accuracy rate.
In Maenpaa (2023) research, they explore methods for identifying and positioning corn based on machine vision. To do this, the ultra-green feature algorithm and the maximum variance method between classes were used to segment corn, weeds, and soil. The effect of the segmentation was satisfactory, and it was possible to perform the extraction of the shape features. As a result of the morphological reconstruction and pixel projection histogram method, they obtained the identification and positioning of the corn. With this, they found that the recognition can reach 94.1% accuracy when the robot travels at a speed of 1.6 km/h.
Furthermore, in a study, Mangina et al. (2022), developed a deep learning Convolutional Neural Network (CNN), which was trained to perform the classification of plant species found in Ireland through images obtained by a cell phone camera. The RGB images of plants went through pre-processing, which includes background removal and data augmentation, and then were used in some deep-learning CNN models, which had different levels of layers and training methods. Several learning models were trained and evaluated for speed and robustness in plant identification, with this an application was developed to incorporate the highest-performing model.
Although the studies presented show that the use of technologies can be an effective tool for botanical identification, there are significant limitations to be considered. Most studies present relatively small samples, which may not be representative of the full diversity of species. In addition, variability in image capture conditions (such as season, sample processing and camera quality) can affect the accuracy of the models. The need to improve the technologies used and increase the robustness of the models to different conditions is evident. To make progress in this area, it is crucial to develop solutions that can be applied in a wide range of conditions and that take into account the intrinsic variability of species and natural environments.
3.1 Classification and Pattern Recognition Process
To conduct the classification, it was necessary to find measures and characteristics inherent to each class that could be used to differentiate the plant species, these characteristics are called attributes (Ponti, 2004).
The attributes chosen for analysis are in Table 1. Their respective concepts are presented in the Theoretical Reference section and extraction methods are presented in subsequent topics. The proposed attributes selection is based on studies by De Paula (2012), Ojala, Pietikainen, & Maenpaa (2002), Ahonen, Matas, He, & Pietikäinen (2009), and Zhu, Hoi, Lyu, & Yan (2008) given the satisfactory results obtained by them.
Normalization was performed with the complete set of data, attribute by attribute, concatenating the species next to each other so the process occurred independently of the species, normalizing it column by column. Given the generated vectors, normalize was applied, adopting the range method so that the data range was scaled between [−1; 1].
Table 1 – The table summarizes the features extracted for botanical classification, divided into different approaches: statistical, structural and spectral. The statistical approach includes methods based on the distribution of colors or textures in the different color spaces and on gray level co-occurrence matrices (GLCM). The attributes are Color (LAB) and Color (RGB), Color (Mixed Channels) and GLCM (Mixed Channels). The structural approach uses Local Binary Patterns (LBP) and their variations to capture the structure of the texture. The spectral approach includes methods based on Gabor filters
|
Approach |
Attribute |
Vector |
|
Statistic |
Color (LAB) |
81 |
|
Statistic |
Color (RGB) |
81 |
|
Statistic |
Color (Mixed Channels) |
18 |
|
Statistic |
GLCM (Mixed Channels) |
84 |
|
Structural |
LBP8.1 |
59 |
|
Structural |
LBP16.1 |
243 |
|
Structural |
LBP8.2 |
59 |
|
Structural |
LBP16.2 |
243 |
|
Structural |
LBPHF 8.1 |
76 |
|
Structural |
LBPHF 16.2 |
276 |
|
Structural |
LBPHF 24.3 |
604 |
|
Structural |
LPQ |
256 |
|
Spectral |
Gabor |
120 |
Source: Organized by the authors (2023)
After extracting the features, the supervised classification model was used, which consists of working with known samples of each class to find a classifier that can be used later to label unknown objects (Ponti, 2004).
The models were validated by the Cross-Validation method, a technique to assess the generalizability of a model from a data set, especially when the objective of the model is prediction (Kohavi, 1995). In it, the dataset of size n is divided into m disjoint sets of size n/m, so that the algorithm is trained m times. At each iteration, a distinct set is reserved for validation. The performance is estimated as the average error or the average hit rate over these m data sets (Koerich, 2008). For this work, the data were divided into five groups, therefore, five sets of 120 observations were created. The proposed models were trained five times and validated with a set of 120 images.
3.2 Anatomical information
The Forest Species Database − MicroscopicI image bank was used (Martins, Oliveira, Nisgoski, & Sabourin, 2013) containing 2240 microscopic images of 112 species. According to Martins, Oliveira, Nisgoski, & Sabourin (2013), the images were acquired from the wood leaves using an Olympus Cx40 microscope with 100x zoom. The resulting color image was saved in PNG (Portable Network Graphics) without compression and a resolution of 1024 x 768 pixels.
Given technological limitations, only 30 species randomly selected were used, totaling 600 observations, 20 per species. The species listed below, which are: Acacia tucumanensis Griseb., Agathis beccarii Warb., Araucaria angustifolia (Bertol.) Kuntze, Calocedrus decurrens (Torr.) Florin, Cariniana estrellensis (Raddi) Kuntze, Cephalotaxus drupacea Siebold & Zucc., Cephalotaxus harringtonia (Knight ex J.Forbes) K.Koch, Chamaecyparis formosensis Matsum., Chamaecyparis pisifera (Siebold & Zucc.) Endl., Chrysophyllum L., Copaifera trapezifolia Hayne, Couratari Aubl., Cupressus arizonica Greene, Cupressus lindleyi Klotzsch ex Endl., Eperua falcata Aubl., Ephedra californica S.Watson, Eschweilera matamata Huber, Eschweilera chartacea (O.Berg) Eyma, Fitzroya cupressoides (Molina) I.M.Johnst., Ginkgo biloba L., Hymenaea courbaril L., Hymenaea L., Larix laricina (Du Roi) K.Koch, Larix kaempferi (Lamb.) Carrière, Larix Mill., Micropholis guyanensis (A.DC.) Pierre, Chrysophyllum lucentifolium Cronquist, Pterocarpus violaceus Vogel, Schizolobium parahyba (Vell.) Blake, Torreya nucifera (L.) Siebold & Zucc.
3.3 Extraction
Pre-processing operations are required, such as highlighting and segmentation, to bring out fine details in the image. Each feature extraction technique, however, requires specific preparation before its application, so the pre-processing and feature extraction process will be explained together. The tool that enabled the feature extraction was MATLAB, a high-performance software focused on numerical calculation, it has a series of tools aimed at digital image processing, signal processing, and machine learning. The work was subdivided to group the extraction techniques by the adopted approach: Statistical, Structural, or Spectral, as proposed by Gonzalez & Woods (2000) and adopted by De Paula (2012).
3.4 Statistical Approach
3.4.1 Color Analysis
Following De Paula (2012), the color channels L(Luv), S(HSV), and G(RGB) were highlighted. For each one, histograms were generated normalized between 0 and 255, and from these, two color regions were defined that allowed a better representation of the species (De Paula, 2012). The pre-processing operations consisted of extracting the color channels individually and normalizing the data, so that the L and S channels were rescaled to assume values between 0 and 255, through the rescale function, such as the G channel, to allow the slicing of the L and S channels in the ranges from 0 to 200 and from 201 to 255, while for the G channel, it was from 0 to 127 and 128 to 255.
From these six slices, information on mean, kurtosis, and obliquity was extracted, generating a vector of 18 attributes (De Paula, 2012). The second color analysis was performed for the RBG and Lab models. In them, each image was subdivided into a 3x3 grid, and mean variance, and obliquity were extracted from each of the nine sub-images of this grid. For each color channel, two vectors of 81 attributes were generated.
3.4.2 Co-occurrence Matrix - GLCM
For the extraction of GLCM, channels H, S (HSV), and G (RGB) were used. Once again, the images were rescaled and for each color channel, the tones co-occurrence matrix and graycomatrix for angles 0º, 45º, 90º, and 135º were extracted, using distance 1 (one). Based on the findings of De Paula (2012), Contrast, Correlation, Entropy, Homogeneity, 3rd Order Moment, and Maximum Probability were calculated, generating a vector of 28 attributes for each channel.
3.5 Structural Approach
3.5.1 Local Binary Pattern – LBP
In this technique, tests were performed using LBPu2 and LBP-HF from grayscale images, where the notation u2 refers to the use of uniform rotation with U having a maximum value of 2 (Ojala, Pietikainen, & Maenpaa, 2002), while the LBP-HF represents the use of the discrete Fourier transform in the LBP histogram (De Paula, 2012). The algorithms for feature extraction by the method in question are presented in the appendix.
3.5.2 Local Phase Quantization - LPQ
To extract features by the LPQ method, the application provided by the group and computer vision of the University of Oulu was used. The neighborhood size of 3 × 3 was used, so that as a result the algorithm returns a vector of 256 positions, which represents the histogram generated by the LPQ. As with LBP, LPQ requires the processed image to be in grayscale.
3.6 Spectral Approach
3.6.1 Gabor filter
The functions used by Haghighat, Zonouz, & Abdel-Mottaleb (2015) that allowed a FilterBank were applied here, with eight variations of the orientation factor (µ = 0, 1, ..., 7) and five scales (v = 0, 1, ..., 4). Forty filters were generated, applied to the image, totaling 40 sub-images, and from these the statistical moments were calculated: mean, variance and obliquity, generating a vector of 120 attributes, as shown by De Paula (2012). The filters for this work were generated by algorithm 3 in the appendices.
3.7 Classification methodology
The Classification Learner application was used, where it was possible to explore supervised machine learning using several classifiers, such as: Decision Trees, Discriminant Analysis, Support Vector Machines (SVM), Logistic Regression, Nearest Neighbors and Ensemble Classification (The MathWorks, 2019). Subsequently, the obtained data were structured in the table data type and passed as input to the application.
The images were classified one descriptor at a time and the resulting accuracy and method that presented the best performance was recorded. A single classifier that performs well is sometimes sufficient to solve the problem. However, in more complex problems, the choice of a single classifier can become difficult since it could limit the system recognition capacity. In these cases, combination is recommended (Ponti, 2004). Therefore, the descriptors were combined to verify if there was an accuracy improvement.
In general, high performance for the studied descriptors can be observed, especially LBP-HF (3.24) and LPQ (Tables 2, 3), with 96.7% and 96% assertiveness, respectively. Ensemble frequently showed better results, especially for the structural approach, but sometimes also Discriminant Analysis and SVM, both robust classification methods.
Table 2 – The table shows the performance results for different color and texture descriptors using robust classifiers. The descriptor that stood out the most was the Gray-Level Co-Occurrence Matrix (GLCM) applied to the Green (RGB), Hue and Saturation (HSV) channels, showing an assertiveness rate of 94.8% with the Discriminant Analysis classifier
|
Describer |
Best Result (%) |
Classifier |
|
Color (Lab) |
67.3 |
Ensemble |
|
Color (RGB) |
66.3 |
SVM |
|
Color (GLS) |
83.8 |
Discriminant Analysis |
|
GLCM (GHS) |
94.8 |
Discriminant Analysis |
Source: Organized by the authors (2023)
The descriptor that stands out is the Gray-Level Co-Occurrence Matrix (GLCM) applied to the Green (RGB), Hue and Saturation (HSV) channels, which presented 94.8% when the Discriminant Analysis classifier was applied (Table 2). The GLCM method has already been widely used for forest species recognition, with an accuracy of 55.97% (De Paula 2012), 72% (Tou, Lau, & Tay, 2007) and 95% (Khalid, Lee, Yusof, & Nadaraj, 2008).
Figure 1 represents the data scatter plot for the GLCM descriptor, it can be seen how the classes are well defined, although there are certain overlapping points. In the literature GLCM presents satisfactory results for classification, which was reaffirmed by these results. As for the classifier, Discriminant Analysis was the highlight. Even though Lattin, Carroll, & Green (2011) considered it very efficient, it is a technique sensitive to the proportion between the sample size and the number of predictor variables and therefore it would be interesting to evaluate the classifier performance for a larger number of observations and/or descriptors.
Figure 1 – Scatter plot of the data for the GLCM (Gray-Level Co-Occurrence Matrix) descriptor applied to the Green (RGB), Hue and Saturation (HSV) channels. The graph shows that the classes are well defined, despite some overlapping points
Source: Author’s/ Authors’ private collection (2023)
It is worth noting that De Paula (2012) obtained a high accuracy degree of 79.5% for the LAB color descriptor, but for macroscopic images, the SVM classifier and a more comprehensive image base. These factors may justify the discrepancy in the 67.3% accuracy obtained in this research. The Ensemble classifier had a performance of 35.8%, considered low when compared to the 67.97% accuracy for the SVM classifier obtained by De Paula (2012). The negative discrepancy raises questions regarding the size of the database used and the use of macroscopic images by the referenced author.
Table 3 – The table shows the performance results for different structural descriptors using robust classifiers. The structural approach proved to be highly effective in this work, with predictable behavior: as the number of neighbors for the LBP and LBPHF descriptors increases, so does the classification performance. However, increasing the number of neighbors increases the computational cost of analysis
|
Describer |
Best Result (%) |
Classifier |
|
LBP8.1 |
89.2 |
Discriminant Analysis |
|
LBP8.2 |
92 |
Discriminant Analysis |
|
LBP16.1 |
95.5 |
Ensemble |
|
LBP16.2 |
94.3 |
Ensemble |
|
LBPHF 8.1 |
90.2 |
Ensemble |
|
LBPHF 16.2 |
95.2 |
Ensemble |
|
LBPHF 24.3 |
96.7 |
Ensemble |
|
LPQ |
96 |
Ensemble |
Source: Organized by the authors (2023)
The results for Structural Approach are shown in Table 3 and they presented the best results in this research. The performance is very predictable, for example, as the number of neighbors for LBP and LBP-HF increases, classification performance is also increased. However, increasing the number of neighbors also increases the computational cost for analysis.
For the analyses, a 96.7% performance was measured at a high computational cost for the LBPHF 24.3 descriptor. The classes are visually less perceptible, yet the Ensemble classifier achieves excellent results (Figure 2).
The second-best performer is LPQ, a noise-insensitive variation of LBP, with a performance of 96%. Although the performance was 0.7% below LBP, the LPQ descriptor has an excellent computational cost, making the superiority of this method quite evident. The structural methods are suited well to microscopic images in which the image primitives are quite evident. Figure 3 shows scatter plot for LPQ, illustrating distinguishable classes and well-distributed data.
Figure 2 – Scatter plot of the data for the LBPHF 24.3 descriptor (Local Binary Patterns with Fourier Histograms, 24 neighbors, 3 radii). The graph shows that, despite the classes being visually less noticeable, the Ensemble classifier managed to achieve an impressive assertiveness rate of 96.7%
Source: Author’s/ Authors’ private collection (2023)
Figure 3 – Scatter plot of the data for the LPQ (Local Phase Quantization) descriptor, where the classes are well distinguishable, and the data has a uniform distribution. The combination of the LPQ and GLCM (Gray-Level Co-Occurrence Matrix) descriptors applied to the Green (RGB), Hue and Saturation (HSV) channels proved to be highly effective
Source: Author’s/ Authors’ private collection (2023)
The combination of the LPQ and GLCM(GHS) descriptors reached a precision of 99.3% for the Ensemble classifier’s best training, out of the 600 observations, the Ensemble classifier misclassified only four, resulting in a precision of 99.3%. The combination LBPHF 24.3 and GLCM(GHS) resulted in 98.7% for the Ensemble classifier. Even with a significant result and LBPHF 24.3 being a robust descriptor, it has a high computational cost and the combination of GLCM with LPQ was more effective. Therefore, the combination of the LPQ and GLCM(GHS) descriptors would be interesting for a future application of botanical identification, as they are established descriptors, easy to implement, and have low computational cost that, associated with the Ensemble classifier, present excellent performance for microscopic image classification.
Through the Classification Learner tool, the best classification method was observed, where the Ensemble method stood out, based on using the set of distinct classifiers and combining their responses to achieve the best result. The combination method was also effective when the LPQ and GLCM descriptors were grouped, achieving a 99.3% performance in the classification process, a result superior to the individual use of the descriptors.
The hope is that, In the future, we hope to carry out botanical identification specifically of Amazonian species and aggregate the results for the development of a botanical recognition application that can be validated and adopted by environmental inspection bodies, as well as further the area of research into species characteristic of the Amazon region, thus contributing to environmental conservation and the protection of biodiversity.
The authors would like to express their immense gratitude to Julie Flávia Vieira Vinente (in memoriam), for all the effort put into the development of this work, which would not have been possible without her initiative and dedication. It is worth mentioning, therefore, that her name will be present in all the directions this research will take us, always leading to better results. We would also like to thank the Universidade Federal do Oeste do Pará (UFOPA), for all the support given during the research.
Ahonen, T., Hadid, A., & Pietikainen, M. (2006). Face description with local binary patterns: Application to face recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28(12), 2037–2041. Retrieved from: https://ieeexplore.ieee.org/document/1717463. doi: 10.1109/TPAMI.2006.244
Ahonen, T., Matas, J., He, C., & Pietikäinen, M. (2009). Rotation invariant image description with local binary pattern histogram fourier features. In 16th Scandinavian Conference, Image Analysis (pp. 61–70). Oslo: SCIA.
Azevedo, E., Conci, A., & Leta, F. R. (2007). Computação gráfica: Teoria e prática (Vol. 2). Rio de Janeiro: Alta Books.
De Paula, P. L. (2012). Reconhecimento de espécies florestais através de imagens macroscópicas (Master’s thesis). Universidade Federal do Oeste do Pará, Santarém, PA, Brazil.
Ferreira, R. L. A., Cerqueira, R. M., & Junior, R. C. C. (2020). Análise da identificação botânica em inventários florestais de planos de manejo sustentáveis no oeste paraense. Nature and Conservation, 13(3), 136-145. Retrieved from: https://sustenere.inf.br/index.php/nature/article/view/CBPC2318-2881.2020.003.0014. doi: https://doi.org/10.6008/CBPC2318-2881.2020.003.0014
Gonzalez, R. C., & Woods, R. E. (2000). Processamento de magens digitais. Blucher.
Haghighat, M., Zonouz, S., & Abdel-Mottaleb, M. (2015). CloudID: Trustworthy cloud-based and cross-enterprise biometric identification. Expert Systems with Applications, 42(21), 7905–7916. Retrieved from: https://www.sciencedirect.com/science/article/abs/pii/S0957417415004273?via%3Dihub doi: https://doi.org/10.1016/j.eswa.2015.06.025
Haralick, R. M., Shanmugam, K., & Others. (1973). Textural features for image classification. IEEE Transactions on Systems, Man, and Cybernetics, 3(6), 610–621. Retrieved from: https://ieeexplore.ieee.org/document/4309314. doi: 10.1109/TSMC.1973.4309314
Khalid, M., Lee, E. L. Y., Yusof, R., & Nadaraj, M. (2008). Design of an intelligent wood species recognition system. International Journal of Simulation Systems, Science and Technology, 9(9), 9–19. Retrieved from: https://ijssst.info/Vol-09/No-3/paper2.pdf
Koerich, A. L. (2008). Reconhecimento de padrões em imagens (Ph.D’s thesis). Universidade Federal do Paraná, Curitiba, PR, Brazil.
Kohavi, R. (1995). A study of cross-validation and bootstrap for accuracy estimation and model selection. In 14th International Joint Conference on Artificial Intelligence (Vol. 2, pp. 1137–1145). San Francisco: Morgan Keufmann Publishers Inc.
Lattin, J., Carroll, J. D., & Green, P. E. (2011). Análise de dados multivariados. Cengage Learning.
Maenpaa, T. (2003). The local binary pattern approach to texture analysis: Extensions and applications (Ph.D’s thesis). Oulun Yliopisto, Oulu, Finland.
Mangina, E., Burke, E., Matson, R., O’Briain, R., Caffrey, J. M., & Saffari, M. (2022). Plant species detection using image processing and deep learning: A mobile-based application. In Information and Communication Technologies for Agriculture—Theme II: Data (pp. 103–130). Springer International Publishing. Retrieved from: https://link.springer.com/chapter/10.1007/978-3-030-84148-5_5. doi: 10.1007/978-3-030-84148-5_5
Martins-Da-Silva, R. C. V. (2002). Coleta e identificação de espécimes botânicos. Belém: Embrapa Amazônia Oriental.
Martins, J., Oliveira, L., Nisgoski, S., & Sabourin, R. (2013). A database for automatic classification of forest species. Machine Vision and Applications, 24(3), 567–578. Retrieved from: https://link.springer.com/article/10.1007/s00138-012-0417-5. doi: 10.1007/s00138-012-0417-5
Ojala, T., Pietikäinen, M., & Harwood, D. (1996). A comparative study of texture measures with classification based on featured distributions. Pattern Recognition, 29(1), 51–59. Retrieved from: https://www.sciencedirect.com/science/article/abs/pii/0031320395000674. doi: https://doi.org/10.1016/0031-3203(95)00067-4
Ojala, T., Pietikainen, M., & Maenpaa, T. (2002). Multiresolution gray-scale and rotation invariant texture classification with local binary patterns. IEEE Transactions on Pattern Analysis and Machine Intelligence, 24(7), 971–987. Retrieved from: https://ieeexplore.ieee.org/document/1017623. doi: 10.1109/TPAMI.2002.1017623
Ponte, M. J. M. D. (2017). Referencial semântico no suporte da identificação botânica de espécies amazônicas (Ph.D’s thesis). Universidade Federal do Oeste do Pará, Santarém, PA, Brazil. Retrieved from:
Ponti, M. P. Jr. (2004). Combinação de múltiplos classificadores para identificação de materiais em imagens ruidosas (Master’s thesis). Universidade Federal de São Carlos, São Carlos, SP, Brazil.
Ribeiro, A. C. F., Da Fonseca, L. C., & Pereira, C. M. P. (2020). O plano de manejo florestal como instrumento de desenvolvimento sustentável na Amazônia. Direito e Desenvolvimento, 11(1), 264-276. Retrieved from: https://periodicos.unipe.edu.br/index.php/direitoedesenvolvimento/article/view/875. doi: https://doi.org/10.26843/direitoedesenvolvimento.v11i1.875
Solomon, C., & Breckon, T. (2011). Fundamentals of Digital Image Processing: A practical approach with examples in Matlab. John Wiley & Sons.
The MathWorks, I. (2019). Classification Learner. The MathWorks.
Tou, J. Y., Lau, P. Y., & Tay, Y. H. (2007). Computer vision-based wood recognition system. Plant Methods, 17, 47. Retrieved from: https://plantmethods.biomedcentral.com/articles/10.1186/s13007-021-00746-1#citeas. doi: https://doi.org/10.1186/s13007-021-00746-1.
Veras, H. F., Ferreira, M. P., Neto, E. M. C., Figueiredo, E. O., Corte, A. P. D., & Sanquetta, C. R. (2022). Fusing multi-season UAS images with convolutional neural networks to map tree species in Amazonian forests. Ecological Informatics, 71, 101815. Retrieved from: https://www.sciencedirect.com/science/article/abs/pii/S1574954122002655. doi: https://doi.org/10.1016/j.ecoinf.2022.101815
Vieira, G. L. S., Ponte, M. J. M., Moutinho, V. H. P., Jardim-Gonçalves, R., Lima, C. P., & Vinagre, M. V. (2022). Identification of wood from the Amazon by characteristics of Haralick and Neural Network: image segmentation and polishing of the surface. iForest - Biogeosciences and Forestry, 15(4), 234. Retrieved from: https://iforest.sisef.org/abstract/?id=ifor3906-015. doi: https://doi.org/10.3832/ifor3906-015
Xu, B., Chai, L., & Zhang, C. (2021). Research and application on corn crop identification and positioning method based on Machine vision. Information Processing in Agriculture, 8(4), 505–513. Retrieved from: https://www.sciencedirect.com/science/article/pii/S2214317321000603?via%3Dihub. doi: https://doi.org/10.1016/j.inpa.2021.07.004
Yu, H., Cao, J., Liu, Y., & Luo, W. (2009). Non-equal spacing division of HSV components for wood image retrieval. International Congress on Image and Signal Processing, New York, USA, 2. Retrieved from: https://ieeexplore.ieee.org/document/5303915/similar. doi: 10.1109/CISP.2009.5303915
Zhu, J., Hoi, S. C., Lyu, M. R., & Yan, S. (2008). Near-duplicate keyframe retrieval by nonrigid image matching. In Proceedings of the 16th ACM international conference on Multimedia (pp. 41–50). New York: ACM. Retrieved from: https://dl.acm.org/doi/10.1145/1459359.1459366. doi: https://doi.org/10.1145/1459359.1459366
Algorithm 1 – The LBP feature extraction algorithm in MATLAB
function [descripteurs] = haralick(chemin,granule,d)
fprintf (chemin);
fprintf(‘...\n’);
descripteurs=zeros(40,24,’double’);
Ng = 256;
for cpt = 1:40
fprintf(‘ Image %d \n’,cpt);
if (cpt < 10)
image = imread([chemin granule ‘-0’ num2str(cpt) ‘.bmp’]);
end;
if (cpt >= 10)
image = imread([chemin granule ‘-’ num2str(cpt) ‘.bmp’]);
end;
image = rgb2gray(image);
image = double(image);
Nx = size(image,1);
Ny = size(image,2);
temp=zeros(2,24,’double’);
for i = 1:2
subimage = image(((i-1)*128 + 1):(i*128), 1:128);
gtsdmMatrix = zeros(Ng,Ng,4,’double’);
nbRows = size(subimage,1);
nbColumns = size(subimage,2);
% Calcul des 4 Gray Tone Spatial Dependence Matrices (gtsdm)
for k = 1:nbRows
for l = 1:nbColumns
for m = (-d):d
for n = (-d):d
if ((k + m >= 1) && (k + m <= nbRows) && (l + n >= 1) && (l + n <= nbColumns))
currentPixelValue = subimage(k,l);
neighborPixelValue = subimage(k + m, l + n);
% Horizontal
if (m == 0 && abs(n) == d)
gtsdmMatrix(currentPixelValue + 1 , neighborPixelValue + 1,1)= gtsdmMatrix(currentPixelValue + 1 , neighborPixelValue + 1,1) + 1;
else
% 45 degrees
if (m == (-n) && abs(m) == d)
gtsdmMatrix(currentPixelValue + 1 , neighborPixelValue + 1,2)=
gtsdmMatrix(currentPixelValue + 1 , neighborPixelValue + 1,2) + 1;
else
% Vertical
if (n == 0 && abs(m) == d)
gtsdmMatrix(currentPixelValue + 1 , neighborPixelValue + 1,3)=
gtsdmMatrix(currentPixelValue + 1 , neighborPixelValue + 1,3) + 1;
else
% 135 degrees
if (m == n && abs(m) == d)
gtsdmMatrix(currentPixelValue + 1 , neighborPixelValue +
1,4)= gtsdmMatrix(currentPixelValue + 1 , neighborPixelValue + 1,4) + 1;
end;
end;
end;
end;
end;
end;
end;
end;
end;
% Normalization
%R = 4 * (nbRows -1) * (2 * nbColumns - 1);
%gtsdmMatrix = gtsdmMatrix./R;
Px = zeros(Ng,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
Px(k,m) = Px(k,m) + gtsdmMatrix(k,l,m);
end;
end;
end;
Py = Px;
Pxplusy = zeros(2*Ng,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
Pxplusy((k+l),m) = Pxplusy((k+l),m) + gtsdmMatrix(k,l,m);
end;
end;
end;
Pxmoinsy = zeros(Ng,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
Pxmoinsy(abs(k-l)+1,m) = Pxmoinsy(abs(k-l)+1,m) + gtsdmMatrix(k,l,m);
end;
end;
end;
% Angular Second Moment
f1 = zeros(1,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
f1(m) = f1(m) + gtsdmMatrix(k,l,m)^2;
end;
end;
end;
% Contrast
f2 = zeros(1,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
f2(m) = f2(m) + (abs(k-l))^2 * gtsdmMatrix(k,l,m);
end;
end;
end;
% Correlation
ux = mean(Px);
uy=ux;
sigmax = std(Px);
sigmay = sigmax;
f3 = zeros(1,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
f3(m) = f3(m) + k*l*gtsdmMatrix(k,l,m);
end;
end;
end;
for m = 1:4
f3(m) = (f3(m) - ux(m)*uy(m)) / (sigmax(m)*sigmay(m));
end;
% Sum of squares
f4 = zeros(1,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
f4(m) = f4(m) + (k - ux(m))^2 * gtsdmMatrix(k,l,m);
end;
end;
end;
% Inverse difference moment
f5 = zeros(1,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
f5(m) = f5(m) + (1 / (1 + (k - l)^2)) * gtsdmMatrix(k,l,m);
end;
end;
end;
% Sum of average
f6 = zeros(1,4,’double’);
for k = 2:(2*Ng)
for m = 1:4
f6(m) = f6(m) + k * Pxplusy(k,m);
end;
end;
% Sum entropy
f8 = zeros(1,4,’double’);
for k = 2:(2*Ng)
for m = 1:4
f8(m) = f8(m) + Pxplusy(k,m) * log(Pxplusy(k,m) + 1e-1);
end;
end;
f8 = -f8;
% Sum variance
f7 = zeros(1,4,’double’);
for k = 2:(2*Ng)
for m = 1:4
f7(m) = f7(m) + (k - f8(m))^2 * Pxplusy(k,m);
end;
end;
% Entropy
f9 = zeros(1,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
f9(m) = f9(m) + gtsdmMatrix(k,l,m) * log(gtsdmMatrix(k,l,m) + 1e-1);
end;
end;
end;
f9 = -f9;
% Difference variance
f10 = std(Pxmoinsy);
% Sum variance
f11 = zeros(1,4,’double’);
for k = 0:(Ng - 1)
for m = 1:4
f11(m) = f11(m) + Pxmoinsy(k+1,m) * log(Pxmoinsy(k+1,m) + 1e-1);
end;
end;
f11 = -f11;
% Information measures of correlation
% Px entropy
HX = zeros(1,4,’double’);
for k = 1:Ng
for m = 1:4
HX(m) = HX(m) + Px(k,m) * log(Px(k,m) + 1e-1);
end;
end;
HX = -HX;
HY = HX;
%HXY1
HXY1 = zeros(1,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
HXY1(m) = HXY1(m) + gtsdmMatrix(k,l,m) * log(Px(k,m) * Py(l,m) + 1e-1);
end;
end;
end;
HXY1 = -HXY1;
%HXY2
HXY2 = zeros(1,4,’double’);
for k = 1:Ng
for l = 1:Ng
for m = 1:4
HXY2(m) = HXY2(m) + Px(k,m) * Py(l,m) * log(Px(k,m) * Py(l,m) + 1e-1);
end;
end;
end;
HXY2 = -HXY2;
f12 = zeros(1,4,’double’);
f13 = zeros(1,4,’double’);
for m = 1:4
f12(m) = (f9(m) - HXY1(m)) / max(HX(m),HY(m));
f13(m) = -sqrt(1 - exp(-2 * (HXY2(m) - f9(m))));
end;
% maximal correlation coefficient
% Q = zeros(Ng,Ng,4,’double’);
% for k = 1:Ng
% for l = 1:Ng
% for p = 1:Ng
% for m = 1:4
% Q(k,l,m) = Q(k,l,m) + (gtsdmMatrix(k,p,m) * gtsdmMatrix(l,p,m)) / (Px(k,m) * Py(p,m) + 1);
% end;
% end;
% end;
% end;
% eigenvalues = zeros(1,Ng,4,’double’);
% for k = 1: Ng
% for m = 1:4
% eigenvalues(1,k,m) = Q(k,k,m);
% end;
% end;
% f14 = zeros(1,4,’double’);
% for m = 1:4
% u = unique(eigenvalues(:,:,m));
% f14(m) = u(end-1);
% end;
temp(i,1) = mean(f1);
temp(i,2) = std(f1);
temp(i,3) = mean(f2);
temp(i,4) = std(f2);
temp(i,5) = mean(f3);
temp(i,6) = std(f3);
temp(i,7) = mean(f4);
temp(i,8) = std(f4);
temp(i,9) = mean(f5);
temp(i,10) = std(f5);
temp(i,11) = mean(f6);
temp(i,12) = std(f6);
temp(i,13) = mean(f7);
temp(i,14) = std(f7);
temp(i,15) = mean(f8);
temp(i,16) = std(f8);
temp(i,17) = mean(f9);
temp(i,18) = std(f9);
temp(i,19) = mean(f10);
temp(i,20) = std(f10);
temp(i,21) = mean(f11);
temp(i,22) = std(f11);
temp(i,23) = mean(f12);
temp(i,24) = std(f12);
temp(i,25) = mean(f13);
temp(i,26) = std(f13);
%temp(ij,25) = mean(f14);
%temp(ij,26) = std(f14);
end;
descripteurs(cpt,1) = mean(temp(1:2,1));
descripteurs(cpt,2) = mean(temp(1:2,2));
descripteurs(cpt,3) = mean(temp(1:2,3));
descripteurs(cpt,4) = mean(temp(1:2,4));
descripteurs(cpt,5) = mean(temp(1:2,5));
descripteurs(cpt,6) = mean(temp(1:2,6));
descripteurs(cpt,7) = mean(temp(1:2,7));
descripteurs(cpt,8) = mean(temp(1:2,8));
descripteurs(cpt,9) = mean(temp(1:2,9));
descripteurs(cpt,10) = mean(temp(1:2,10));
descripteurs(cpt,11) = mean(temp(1:2,11));
descripteurs(cpt,12) = mean(temp(1:2,12));
descripteurs(cpt,13) = mean(temp(1:2,13));
descripteurs(cpt,14) = mean(temp(1:2,14));
descripteurs(cpt,15) = mean(temp(1:2,15));
descripteurs(cpt,16) = mean(temp(1:2,16));
descripteurs(cpt,17) = mean(temp(1:2,17));
descripteurs(cpt,18) = mean(temp(1:2,18));
descripteurs(cpt,19) = mean(temp(1:2,19));
descripteurs(cpt,20) = mean(temp(1:2,20));
descripteurs(cpt,21) = mean(temp(1:2,21));
descripteurs(cpt,22) = mean(temp(1:2,22));
descripteurs(cpt,23) = mean(temp(1:2,23));
descripteurs(cpt,24) = mean(temp(1:2,24));
descripteurs(cpt,25) = mean(temp(1:2,25));
descripteurs(cpt,26) = mean(temp(1:2,26));
end;
Algorithm 2 – Algorithm for LBP-HF features in MATLAB, by Ahonen et al. (2009)
% Reads, converts to grayscale
imagem = rgb2gray(imagem);
% rotates the image
I2 = imrotate(imagem,90);
% generates a para with size 8
mapping = getmaplbphf(8);
% extracts the LBP and extracts the histogram
h = lbp(imagem,1,8,mapping,’h’);
h = h/sum(h);
histograms(1,:) = h;
% extracts the LBP for the rotated image
h = lbp(I2,1,8,mapping,’h’);
h = h/sum(h);
histograms(2,:)=h;
% applies the Fourrier transform and generates the feature vector
result = constructhf(histograms,mapping);
Algorithm 3 – Creates a quantity u*v of gabor filters per Haghighat et al. (2015)
function gaborArray = gaborFilterBank(u,v,m,n)
gaborArray = cell(u,v);
fmax = 0.25;
gama = sqrt(2);
eta = sqrt(2);
for i = 1:u do
fu = fmax/((sqrt(2))(i − 1)) alpha = f u/gama beta = f u/eta
for j = 1:v do
tetav = ((j-1)/v)*pi;
gFilter = zeros(m,n);
for x = 1:m do
for y = 1:n do
xprime = (x-((m+1)/2))*cos(tetav)+(y-((n+1)/2))*sin(tetav);
yprime = -(x-((m+1)/2))*sin(tetav)+(y-((n+1)/2))*cos(tetav);
gFilter(x,y) = (fu2/(pi * gama * eta)) * exp(−((alpha2) ∗ (xprime2) + (beta2) * (ypri
me2)))* exp(1i * 2 * pi * f u * xprime)
end
end
gaborArrayi,j = gFilter;
end
Authorship contributions
1 – Anna Thaís Costa Lopes
Computer Science student at the Federal University of Western Pará.
https://orcid.org/0009-0002-1281-2404 • aannatcosta@gmail.com
Contribution: Conceptualization, Data curation, Investigation, Visualization, Writing - original draft
2 – Márcio José Moutinho da Ponte
PhD by co-tutelle in Electrical and Computer Engineering from the Universidade Nova de Lisboa (2017)
https://orcid.org/0000-0002-0724-3721 • marcio.ponte@ufopa.edu.br
Contribution: Conceptualization, Formal Analysis, Methodology, Project administration, Resources, Software, Validation, Writing - original draft,
3 – Rafael de Aguiar Rodrigues
Graduated in Forestry Engineering from the Universidade Federal do Oeste do Pará (UFOPA)
https://orcid.org/0000-0003-3468-3455 • rafa.rdrgues@gmail.com
Contribution: Data curation, Formal Analysis, Visualization, Writing - review & editing
4 – Victor Hugo Pereira Moutinho
Doctorate in Forest Resources from the Universidade de (2012)
https://orcid.org/0000-0001-7770-3087 • victor.moutinho@ufopa.edu.br
Contribution: Supervision, Writing - review & editing
How to quote this article
Ponte, M. J. M. da, Costa Lopes, A. T., Rodrigues, R. de A., & Pereira Moutinho, V. H. (2025). Computer vision-based wood identification: an approach with LPQ and GLCM descriptors integrated with Ensemble classification Ciência e Natura, 47, e86097. doi: https://doi.org/10.5902/217946086097.
I http://web.inf.ufpr.br/vri/databases/forest-species-database-microscopic/