Next Article in Journal
Hardware-in-the-Loop Simulation of a Controller Area Network-Based Battery Management System for Electric-Powered Emergency Response Boats
Previous Article in Journal
Determining the Freshness of Milkfish (Chanos chanos) Using Electronic Nose
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Digital Microscopy-Based Barong Tagalog Textile Identification Using a Convolutional Neural Network, a Support Vector Machine, and Canny Edge Detection †

by
Edward C. Torralba
,
Jeff B. Totesora
and
Cyrel O. Manlises
*
School of Electrical, Electronics, and Computer Engineering, Mapua University, Manila 1002, Philippines
*
Author to whom correspondence should be addressed.
Presented at the 7th Eurasia Conference on IoT, Communication and Engineering 2025 (ECICE 2025), Yunlin, Taiwan, 14–16 November 2025.
Eng. Proc. 2026, 134(1), 41; https://doi.org/10.3390/engproc2026134041
Published: 13 April 2026

Abstract

In this study, the feasibility of using Canny edge detection for barong tagalog textile detection is examined using a digital microscope with 1000× magnification capabilities. To enhance the differentiation of textile edges, a system incorporating a digital camera was developed to apply a Canny edge detection algorithm. Then, we evaluated the effectiveness of Canny edge detection in delineating the edges of barong tagalog textiles. The results show high accuracy in distinguishing between different textile types within the dataset. Through the adoption of Canny edge detection, the accurate identification of jusi, piña-silk, and cocoon-silk textiles was enhanced. The model demonstrated a 90% accuracy rate (27 out of 30 trials) in detecting jusi, piña-silk, and cocoon-silk textiles based on over 625 data points. The model accurately classified the textiles. The limitations of the developed model can be addressed by expanding the dataset and including a broader range of barong tagalog textiles, thus enhancing the model’s precision and applicability. The developed model in this study contributes to creating a valuable dataset for barong tagalog textiles, and the system’s potential for real-time applications in local stores, manufacturers, and research facilities can be envisioned.

1. Introduction

The men’s dress shirts known as barong tagalog are traditional garments in the Philippines, being typically worn during formal and important occasions. These textiles are produced from various materials, including piña-silk, cocoon-silk, and jusi, each of which is characterized by distinctive textures, appearances, and weaving techniques. The fabrics are commonly presented in plain-woven, twill, and satin patterns.
In textile recognition, support vector machines (SVMs) are employed for feature extraction [1], while convolutional neural networks (CNNs) are used as classification techniques to recognize and identify woven-fabric patterns [2]. To maximize system accuracy, we combined an SVM and a CNN.
Deep neural networks generally outperform traditional methods such as SVMs in object detection and classification tasks, and hybrid models can further enhance performance [3]. Previous study results show that SVMs improve system efficiency in diverse applications, including detecting spot diseases on banana leaves [4], assessing pineapple ripeness [5], and implementing facial recognition in e-attendance systems [6]. Conversely, CNNs provide optimal models for image processing, consistently yielding improved accuracy [7].
Current models largely rely on segmentation methods. In this study, a developed model is used to address limitations in detecting barong tagalog textiles. We employed Canny edge detection with a digital microscope. The Canny edge algorithm effectively extracted edge-based features to differentiate textile patterns, thereby improving classification accuracy. By developing a prototype system with a model capable of capturing images of barong tagalog textiles using a digital microscope, images were effectively processed through edge detection. A prototype system was implemented to classify barong tagalog textiles, specifically, jusi, cocoon-silk, and piña-silk. The system employed a Raspberry Pi 4 Model B and a digital microscope with ×1000 magnification. Out of 40 sample images, 37 were successfully classified, demonstrating the accuracy of the developed model. In the model, SVM was used for feature extraction, whereas CNN was used for classification. System accuracy and a confusion matrix were used for evaluation of system performance.

2. Methodology

Convolutional Neural Networks (CNNs) are deep learning techniques widely recognized for their effectiveness in image classification tasks due to their multi-layer architecture which enables automatic and hierarchical feature extraction [8]. During training, CNN-based models have demonstrated improved accuracy in various applications, including plant classification tasks [9].
The Canny edge detection algorithm has been widely adopted for edge extraction in image processing applications [10]. Enhancements and modifications to the Canny edge algorithm have been proposed to improve system precision and detection performance [11]. The Canny edge detector is known for its reduced error rate in edge detection tasks [12]. Its performance is evaluated on the basis of three primary criteria: signal-to-noise ratio (SNR), localization precision, and single-edge response, which collectively establish its effectiveness as an edge detection operator [13]. Furthermore, the multi-step Canny edge detection process enables accurate edge identification while simultaneously suppressing noise.
Edge recognition is a critical step in image processing, as detection results significantly influence subsequent image analysis and classification processes [14]. In this study, a CNN is employed to classify barong tagalog textiles, while Canny edge detection is utilized to enhance and prepare edge-based features for more effective CNN processing [15]. CNNs are capable of detecting local features within multidimensional input spaces, making them suitable for textile pattern recognition [16]. The Canny edge detection method is applied to extract edges from textile images prior to classification [17]. The Canny operator was designed to function as an optimal edge detector on the basis of defined performance standards, although alternative detectors may claim optimality under slightly different criteria [18]. Textile materials consist of interwoven wefts and warps which may introduce texture noise due to the anisotropic distribution of colors across the textile surface [19]. Experimental results reported in related studies indicate that the Canny detector is among the most effective edge detection techniques available within the edge function framework [20].
It is necessary to broaden the dataset’s scope, and further improve system accuracy, by incorporating a wider variety of barong tagalog textiles. Expanding the dataset to include variations in surroundings, backgrounds, and lighting conditions can enhance the system’s robustness in real-world detection scenarios. Intricate textile characteristics, such as the embroidered patterns and unique motifs woven across the Philippines, provide distinct features that contribute to a deeper representation of barong tagalog diversity. These improvements strengthen the dataset and increase the effectiveness of textile classification.
Figure 1 illustrates the workflow of the developed model. The detection process directly influences subsequent image analysis and classification performance. For training and development, the model utilizes a dataset consisting of 625 images representing specific types of barong tagalog fabrics, namely, jusi, piña-silk, and cocoon-silk. Captured images serve as input for image processing, where Canny edge detection techniques are applied to extract significant edge features. The processed data are then divided into training and testing sets, followed by validation.
Feature extraction is performed by calculating mean pixel values using Support Vector Machine (SVM) techniques. Once the features are extracted, the SVM facilitates the organization of the dataset for training and testing. The system then applies CNN-based classification through a Python version 3.9.13 implementation. The final output categorizes the textiles as piña-silk, jusi, or cocoon-silk, and displays the classification results on an LCD monitor.
Figure 2 illustrates the process for identifying barong tagalog textiles. Images of cocoon-silk, jusi, and piña-silk textiles are provided as input to the system. The process begins with image preparation, which distinguishes between sample images and actual photographs. Next, the images undergo pre-processing to optimize them for model training. This pre-processing step includes image enhancement, feature extraction, and filtering. The Canny edge detection method is employed for feature extraction and edge detection, effectively identifying the edges of the textiles.
Model validation and training are then performed to ensure accurate classification. If the accuracy meets the required threshold, the trained model is stored; otherwise, the training process is repeated to improve performance. Once pre-processing is complete, the system identifies the object within the frame and feeds the information into the CNN-trained model, which predicts the type of barong tagalog textile based on the input image.
Figure 3 illustrates the prototype system for data acquisition used in the enhanced approach to barong tagalog textile analysis. A camera is used to capture images which are subsequently processed, tested, and trained on a Raspberry Pi 4 platform. Textile photographs are obtained using a digital microscope which is equipped with a built-in ×1000 magnification and is fully compatible with the Raspberry Pi 4. The microscope provides high-definition imaging, an adjustable lens, and additional features that facilitate precise and accurate data collection.
Figure 4 presents the dataset collected for jusi, piña-silk, and cocoon-silk textiles using the digital microscope zoom in 1000 times to present precise details. Wireless connection within 5 m, wireless bondage. 8 high-bright LED lights, which can be adjusted freely. 360° rotating base, support horizontal and vertical adjustment, 360° full field of view observation. The system achieved high prediction accuracy, markedly improving detection performance for barong tagalog textiles. Replacing the Raspberry Pi Camera V2 with the digital microscope enhanced image quality and enabled more reliable and consistent identification by the AI system. The images shown below are the saved raw file of the finished process of systems predicted data. Red outline indicates the area where the devices preceded to predict the classification of the textiles and the percentage of the accuracy is indicated at the upper left of the predicted data. (a) represents jusi with a 97% prediction; (b) represents pina-silk with a 99% prediction; (c) represents cocoon silk with a 96% prediction.
Table 1 summarizes the dataset composition. Thirty images were collected for each textile category: cocoon-silk, jusi, and piña-silk. The images were captured using the Digital Camera with ×1000 magnification, stored on a Secure Digital (SD) card, and subsequently processed for classification.

3. Results and Discussion

Figure 5 shows the user interface displaying the predicted classifications of textile images for jusi, piña-silk, and cocoon-silk, along with their associated confidence scores. The system achieved prediction accuracies of 99% for jusi, 96% for piña-silk, and 95% for cocoon-silk. These results indicate improved accuracy in distinguishing among the three textile categories.
The evaluation results include a confusion matrix derived from ten testing trials for each classification. In terms of true positives (TPs), the model correctly identified 10 instances of jusi, 10 of piña-silk, seven of cocoon-silk, and four of non-textile samples, totaling 31. True negatives (TNs) were not observed for any category. False positives (FPs) were recorded for three misclassifications of cocoon-silk and three of non-textile samples, while false negatives (FNs) included three misclassifications from the non-textile category. Accuracy was calculated by dividing the total number of correct predictions by the total number of predictions and multiplying by 100 (Equation (1)), resulting in an overall accuracy of 77.5% (Table 2).
Model accuracy was calculated using the following multi-class accuracy formula:
A c c u r a c y = n = 1 3 A n n i = 1 j = 1 3 A i j  
where Ann represents the diagonal elements of the confusion matrix corresponding to correctly classified samples for each class, and Aij represents all elements of the confusion matrix. In other words, accuracy is computed as the total number of correct predictions divided by the total number of samples, multiplied by 100. Using this approach, the overall accuracy of the model was 77.5% (Table 2).

4. Conclusions and Recommendations

We developed a model for categorizing barong tagalog textiles, specifically, jusi, cocoon-silk, and piña-silk. The prototype system employed edge detection techniques in combination with Convolutional Neural Networks (CNNs) and Support Vector Machines (SVMs). Image acquisition was performed using a digital microscope with ×1000 magnification, while computation and processing were carried out on a Raspberry Pi 4 Model B. Among the 40 sample images tested, 31 were correctly classified, demonstrating the effectiveness of the proposed approach.
To further enhance system performance, the dataset should be expanded to include a broader range of barong tagalog textiles. Incorporating variations in environmental conditions, such as different backgrounds and lighting, can improve the model’s robustness in real-world detection scenarios. Additionally, integrating more complex textile features—including embroidered patterns and region-specific woven motifs—would provide distinct features and a deeper understanding of barong tagalog textile diversity. These improvements are expected to increase classification accuracy and strengthen the applicability of the system in practical contexts.

Author Contributions

Software development (Programming), J.B.T.; research paper development (writing), J.B.T.; Hardware development (prototype creation), J.B.T.; research paper development (writing), E.C.T.; research conceptualization (topic development), C.O.M.; paper editing (polishing and finalization), C.O.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

This study did not require ethical approval.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data is available from the Barong Dataset.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Pellegrino, R.V.; Tarrobago, A.C.; Zulueta, D.L.B. Automated RBC Morphology Counting and Grading Using Image Processing and Support Vector Machine. In 2021 IEEE 13th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management, HNICEM 2021; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2021. [Google Scholar] [CrossRef]
  2. Hussain, M.A.I.; Khan, B.; Wang, Z.; Ding, S. Woven fabric pattern recognition and classification based on deep convolutional neural networks. Electronics 2020, 9, 1048. [Google Scholar] [CrossRef]
  3. Liu, P.; Choo, K.-K.R.; Wang, L.; Huang, F. SVM or deep learning? A comparative study on remote sensing image classification. Soft Comput. 2017, 21, 7053–7065. [Google Scholar] [CrossRef]
  4. Tuazon, G.L.H.; Duran, H.M.; Villaverde, J.F. Portable Sigatoka Spot Disease Identifier on Banana Leaves Using Support Vector Machine. In 2021 IEEE 13th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management (HNICEM); IEEE: New York, NY, USA, 2022; pp. 1–6. [Google Scholar] [CrossRef]
  5. Aguilar, E.J.L.; Borromeo, G.K.P.; Villaverde, J.F. Determination of Pineapple Ripeness Using Support Vector Machine for Philippine Standards. In 2021 7th International Conference on Control Science and Systems Engineering, ICCSSE 2021; IEEE: New York, NY, USA, 2021; pp. 283–287. [Google Scholar] [CrossRef]
  6. Arceo, A.J.C.; Borejon, R.Y.N.; Hortinela, M.C.R.; Ballado, A.H.; Paglinawan, A.C. Design of an e-attendance checker through facial recognition using histogram of oriented gradients with support vector machine. In 2020 IEEE 8th International Conference on Smart City and Informatization, iSCI 2020; IEEE: New York, NY, USA, 2020; pp. 1–5. [Google Scholar] [CrossRef]
  7. Xin, R.; Zhang, J.; Shao, Y. Complex Network Classification with Convolutional Neural Network. Tsinghua Sci. Technol. 2020, 25, 447–457. [Google Scholar] [CrossRef]
  8. Sardogan, M.; Tuncer, A.; Ozen, Y. Plant Leaf Disease Detection and Classification Based on CNN with LVQ Algorithm. In UBMK 2018 Conference 2018 3rd International Conference on Computer Science and Engineering; IEEE: New York, NY, USA, 2018; pp. 382–385. [Google Scholar]
  9. Tenorio, A.J.F.; Desiderio, J.M.H.; Manlises, C.O. Classification of Rincon Romaine Lettuce Using convolutional neural networks (CNN). In Proceedings of the 2022 IEEE 14th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management (HNICEM), Boracay Island, Philippines, 1–4 December 2022; pp. 1–6. [Google Scholar] [CrossRef]
  10. Uy, J.N.; Villaverde, J.F. A Durian Variety Identifier Using Canny Edge and CNN. In 2021 7th International Conference on Control Science and Systems Engineering, ICCSSE 2021; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2021; pp. 293–297. [Google Scholar] [CrossRef]
  11. Allorde, R.R.; Fornoles, C.; Caya, M.V. Computer Vision-Based Foot Measurement Using Modified Canny Edge Algorithm. In 2023 IEEE 5th Eurasia Conference on IOT, Communication and Engineering, ECICE 2023; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2023; pp. 416–420. [Google Scholar] [CrossRef]
  12. IEEE Computational Intelligence Society. Philippines Chapter and Institute of Electrical and Electronics Engineers. In 2019 IEEE 11th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management (HNICEM); IEEE: New York, NY, USA, 2019. [Google Scholar]
  13. Avendaño, G.O.; Ballado, A.H., Jr.; Dela Cruz, J.C.; Echano, N.M., III; Ella, J.N.; Medina, M.E.M.; Paquiz, B.K.C. Philippine Currency Paper Bill Counterfeit Detection Through Image Processing Using Kanny Edge Technology. In Proceedings of the 8th IEEE Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment and Management Conference, HNICEM 2015 Conference Proceedings, Cebu, Philippines, 9–12 December 2015. [Google Scholar]
  14. Cabalar, C.D.; Cleofas, S.M.; Caya, M.V. Identification of Philippine Chili Peppers using Canny Edge Detection and Feed—Forward Artificial Neural Network. In 2022 IEEE 14th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management, HNICEM 2022; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2022. [Google Scholar] [CrossRef]
  15. Yumang, A.N.; Baguisi, J.M.; Buenaventura, B.R.S.; Paglinawan, C.C. Detection of Black Sigatoka Disease on Banana Leaves Using ShuffleNet V2 CNN Architecture in Comparison to SVM and KNN Techniques. In 2023 15th International Conference on Computer and Automation Engineering, ICCAE 2023; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2023; pp. 281–286. [Google Scholar] [CrossRef]
  16. Samonte, M.J.C.; Rosa, A.T.G.D.; Rivera, L.J.C.; Silo, J.S.E. Using hybrid cnn-lstm model for sentiment analysis of covid-19 tweets. In Proceedings—2023 13th International Conference on Software Technology and Engineering, ICSTE 2023; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2023; pp. 133–142. [Google Scholar] [CrossRef]
  17. Nazir, M.K.; Ghani, M.A.N.U.; Ashraf, A.; Alam, S.M.; Farooq, R.U.; Latif, Z. A Textile Image Classification based on Texture and Shape Features. In 4th International Conference on Innovative Computing, ICIC 2021; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2021. [Google Scholar] [CrossRef]
  18. Adak, M.F.; Yolcu, G. Finding Cuts Point of Textile Products Using Blob Analysis Method. In 2013 7th International Conference on Application of Information and Communication Technologies; IEEE: New York, NY, USA, 2013. [Google Scholar]
  19. Luo, H.; Liu, S. Textile Image Segmentation through Region Action Graph and Novel Region Merging Strategy. In Proceedings—2014 International Conference on Virtual Reality and Visualization, ICVRV 2014; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2015; pp. 174–179. [Google Scholar] [CrossRef]
  20. Lodwick, W.; Kreinovich, V. Interval-Related Talks at the North American Fuzzy Information Processing Society Annual Conference NAFIPS’06. Reliab. Comput. 2007, 13, 109–111. [Google Scholar] [CrossRef]
Figure 1. Workflow of the developed model in this study.
Figure 1. Workflow of the developed model in this study.
Engproc 134 00041 g001
Figure 2. Process for identifying barong tagalog textiles.
Figure 2. Process for identifying barong tagalog textiles.
Engproc 134 00041 g002
Figure 3. The prototype system assembled in this study.
Figure 3. The prototype system assembled in this study.
Engproc 134 00041 g003
Figure 4. Types of barong tagalog: (a) jusi; (b) piña-silk; (c) cocoon silk.
Figure 4. Types of barong tagalog: (a) jusi; (b) piña-silk; (c) cocoon silk.
Engproc 134 00041 g004
Figure 5. Model predictions of barong tagalog: (a) jusi; (b) piña-silk; (c) cocoon-silk.
Figure 5. Model predictions of barong tagalog: (a) jusi; (b) piña-silk; (c) cocoon-silk.
Engproc 134 00041 g005
Table 1. Collected data.
Table 1. Collected data.
Barong Tagalog Fabric TypeNumber of Images
Piña-silk100%
Cocoon-silk70%
Jusi100%
Not textile40%
Table 2. Confusion matrix of prediction results.
Table 2. Confusion matrix of prediction results.
Actual TypePredicted TypeTotal Number of Predictions
TPTNFPFN
Cocoon1000010
Jusi1000010
Piña-Silk703010
Not Textile403310
TOTAL3106340
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.

Share and Cite

MDPI and ACS Style

Torralba, E.C.; Totesora, J.B.; Manlises, C.O. Digital Microscopy-Based Barong Tagalog Textile Identification Using a Convolutional Neural Network, a Support Vector Machine, and Canny Edge Detection. Eng. Proc. 2026, 134, 41. https://doi.org/10.3390/engproc2026134041

AMA Style

Torralba EC, Totesora JB, Manlises CO. Digital Microscopy-Based Barong Tagalog Textile Identification Using a Convolutional Neural Network, a Support Vector Machine, and Canny Edge Detection. Engineering Proceedings. 2026; 134(1):41. https://doi.org/10.3390/engproc2026134041

Chicago/Turabian Style

Torralba, Edward C., Jeff B. Totesora, and Cyrel O. Manlises. 2026. "Digital Microscopy-Based Barong Tagalog Textile Identification Using a Convolutional Neural Network, a Support Vector Machine, and Canny Edge Detection" Engineering Proceedings 134, no. 1: 41. https://doi.org/10.3390/engproc2026134041

APA Style

Torralba, E. C., Totesora, J. B., & Manlises, C. O. (2026). Digital Microscopy-Based Barong Tagalog Textile Identification Using a Convolutional Neural Network, a Support Vector Machine, and Canny Edge Detection. Engineering Proceedings, 134(1), 41. https://doi.org/10.3390/engproc2026134041

Article Metrics

Back to TopTop