Saturday, 6 June 2026

Understanding the Paper: Pattern Recognition of Sarong Fabric Using Machine Learning and Computer Vision

Pattern Recognition of Sarong Fabric Using Machine Learning and Computer Vision

The paper “Pattern Recognition of Sarong Fabric Using Machine Learning Approach Based on Computer Vision for Cultural Preservation” presents a computer-vision-based method for classifying traditional Samarinda sarong motifs. The work is important because traditional fabrics are not only commercial products but also cultural heritage objects. Correctly identifying their patterns can support documentation, preservation, digital archiving, and public awareness.

The study focuses on Samarinda sarongs from East Kalimantan, Indonesia. These sarongs have distinctive rectangular motifs and color combinations, but many people may find it difficult to distinguish Samarinda motifs from non-Samarinda motifs. The authors therefore propose an automated pattern-recognition method using image processing, color and texture feature extraction, feature selection, and machine-learning classification.

1. Problem Addressed by the Paper

The paper addresses the problem of recognizing traditional sarong fabric motifs using computer vision. Samarinda sarongs have distinctive patterns, but their motifs can be visually similar to other sarongs. This creates a classification challenge because motif, color, and material may overlap across different sarong types.

The authors argue that traditional fabric recognition is important for cultural preservation. While batik recognition has received more research attention, sarong classification has been relatively limited. This work therefore contributes to the automatic recognition of sarong motifs using image-based features and machine learning.

Core problem: Can a machine-learning model distinguish Samarinda sarong motifs from non-Samarinda sarongs using color and texture features extracted from fabric images?

2. Why Sarong Pattern Recognition Matters

Traditional fabrics preserve regional identity, craft knowledge, and cultural meaning. Samarinda sarongs are used in formal and religious occasions and represent a specific cultural textile tradition of East Kalimantan. However, when people cannot distinguish one motif from another, the cultural identity of the fabric may become blurred.

Automatic recognition can help in digital cataloging, museum documentation, e-commerce tagging, educational tools, and preservation of textile heritage. It can also support younger generations in learning how to identify traditional patterns.

Application How Pattern Recognition Helps
Cultural preservation Documents and identifies regional textile motifs.
Digital archives Allows automatic tagging of textile images.
Education Helps students and the public learn motif differences.
E-commerce Improves product classification and search.
Research Creates a structured method for visual textile classification.

3. Main Idea of the Proposed Method

The paper proposes a traditional machine-learning pipeline rather than an end-to-end deep-learning model. The method first extracts handcrafted color and texture features from sarong images. It then selects the most useful features and feeds them into machine-learning classifiers.

The workflow can be summarized as:

  1. Acquire sarong images using a smartphone camera.
  2. Resize images to a standard size.
  3. Convert RGB images into multiple color spaces.
  4. Extract color features using color moments.
  5. Extract texture features using GLCM and LBP.
  6. Select important features using CFS and PCA.
  7. Classify sarong motifs using machine-learning models.
  8. Evaluate performance using precision, recall, and accuracy.

This pipeline is especially suitable when the visual identity of the textile depends strongly on measurable color and texture patterns.

4. Dataset Used in the Study

The dataset contains 1000 sarong images. The images were captured indoors under even lighting using an iPhone 6s camera. The camera was placed approximately 30–60 cm from the object and kept perpendicular to the fabric. The sarong position was rotated during acquisition to obtain different perspectives.

The images were saved in JPEG format with an original resolution of \(3024 \times 4032\) pixels. The dataset includes six classes: five Samarinda sarong motifs and one non-Samarinda sarong class.

Class Category Number of Images
Belang Hatta Samarinda sarong 100
Belang Negara Samarinda sarong 100
Belang Pengantin Samarinda sarong 100
Garanso Samarinda sarong 100
Kuningsau Samarinda sarong 100
Non-Samarinda Other sarong motifs 500
Total Six classes 1000

5. Pre-processing Pipeline

The first pre-processing step is resizing. The original images of size \(3024 \times 4032\) pixels are resized to \(256 \times 256\) pixels. This reduces computational time and standardizes the input for subsequent processing.

The RGB image is then converted into several color spaces:

  • HSV
  • HSI
  • YIQ
  • YCbCr
  • Grayscale

The color spaces are used for extracting color features, while grayscale images are used for extracting texture features using GLCM and LBP.

Pre-processing Step Purpose
Image resizing Reduces image size and computation time.
RGB to HSV/HSI/YIQ/YCbCr Provides different color representations for feature extraction.
RGB to grayscale Prepares the image for texture feature extraction.

6. Color Moment Features

Color is an important visual cue for sarong motif classification because many sarong types are distinguished by color combinations. The paper uses color moments to describe the distribution of color values in different color spaces.

The five color moments used are:

  • mean, \(\mu\)
  • standard deviation, \(\sigma\)
  • median, \(m\)
  • minimum, \(\min\)
  • maximum, \(\max\)

The mean is calculated as:

\[ \mu_i = \frac{1}{N} \sum_{j=1}^{N} P_{ij} \]

The standard deviation is calculated as:

\[ \sigma_i = \sqrt{\frac{1}{N}\sum_{j=1}^{N}(P_{ij}-\mu_i)^2} \]

Here, \(N\) is the number of pixels in the image, and \(P_{ij}\) is the value of pixel \(j\) in color component \(i\).

Since color moments are extracted from RGB, HSV, HSI, YIQ, and YCbCr color spaces, the paper obtains 75 color features in total.

7. GLCM Texture Features

GLCM stands for Gray Level Co-occurrence Matrix. It measures how often pairs of gray levels occur in an image at a particular distance and direction. This is useful for fabric classification because textile structures contain repeated texture patterns.

The paper extracts GLCM features at four angles:

  • \(0^\circ\)
  • \(45^\circ\)
  • \(90^\circ\)
  • \(135^\circ\)

Eight GLCM features are extracted for each angle:

GLCM Feature Meaning in Textile Context
Contrast Measures intensity variation between neighboring pixels.
Correlation Measures how related neighboring gray values are.
Energy Measures uniformity or repeated texture strength.
Homogeneity Measures closeness of gray-level distribution to the diagonal.
Dissimilarity Measures difference between neighboring gray values.
Entropy Measures randomness or complexity in texture.
Rows mean Summarizes row-wise gray-level distribution.
Columns mean Summarizes column-wise gray-level distribution.

Since 8 features are extracted across 4 angles, GLCM produces:

\[ 8 \times 4 = 32 \]

texture features.

8. Local Binary Pattern Features

Local Binary Pattern, or LBP, is another texture descriptor. It compares each pixel with its surrounding neighborhood and encodes the local texture pattern as a binary value. This is useful for capturing small-scale fabric texture.

For a central pixel, the neighboring pixels are compared with it. If the neighboring pixel is greater than or equal to the central pixel, it is assigned 1; otherwise, it is assigned 0.

The LBP idea can be represented as:

\[ LBP(u,v) = \sum_{t=1}^{N} \Gamma(I_t(u,v)-I_c(u,v))2^{t-1} \]

where:

  • \(I_c(u,v)\) is the central pixel,
  • \(I_t(u,v)\) is a neighboring pixel,
  • \(N = 8\) is the number of neighboring pixels, and
  • \(\Gamma\) is the binary thresholding function.

The paper extracts 10 LBP features. Together with color moments and GLCM, the total number of features becomes:

\[ 75 + 32 + 10 = 117 \]

9. Feature Selection Using CFS and PCA

The paper uses feature selection because not all extracted features are equally useful. Some features may be redundant, weak, or noisy. Reducing the number of features can improve efficiency and sometimes improve classification performance.

Two feature-selection methods are used:

  • Correlation-Based Feature Selection, or CFS
  • Principal Component Analysis, or PCA

Correlation-Based Feature Selection

CFS selects features that are strongly related to the target class but not strongly correlated with each other. In simple terms, it tries to keep useful features and remove redundant ones.

The merit score used in CFS is:

\[ M_s = \frac{k\overline{r_{cf}}}{\sqrt{k + k(k-1)\overline{r_{ff}}}} \]

Here, \(k\) is the number of features, \(\overline{r_{cf}}\) is the average correlation between features and class, and \(\overline{r_{ff}}\) is the average correlation between features.

CFS reduces the number of features from 117 to only 20 features. These include 17 color features and 3 texture features.

Principal Component Analysis

PCA reduces dimensionality by transforming the original feature space into principal components. It keeps directions of maximum variance and removes less informative dimensions.

PCA reduces the original 117 features to 48 features.

Feature Selection Method Number of Features Interpretation
No feature selection 117 All color, GLCM, and LBP features are used.
CFS 20 Most compact and discriminative feature subset.
PCA 48 Reduced feature set based on variance transformation.

10. Machine-Learning Classifiers

After feature extraction and feature selection, the selected features are classified using several machine-learning algorithms. The paper compares:

  • Artificial Neural Network, or ANN
  • C4.5
  • Decision Tree
  • K-Nearest Neighbor, or KNN
  • Naïve Bayes
  • Support Vector Machine, or SVM

The classification task can be represented as:

\[ \hat{y} = f(X) \]

where \(X\) is the selected feature vector and \(\hat{y}\) is the predicted sarong class.

The experiment uses cross-validation with \(k = 2\), \(k = 5\), and \(k = 10\) folds to evaluate robustness.

11. Evaluation Metrics

The paper evaluates performance using precision, recall, and accuracy based on a multiclass confusion matrix.

Accuracy can be understood as:

\[ Accuracy = \frac{\text{Correct Predictions}}{\text{Total Predictions}} \times 100 \]

Precision measures how many predicted examples of a class are actually correct:

\[ Precision = \frac{TP}{TP + FP} \times 100 \]

Recall measures how many actual examples of a class are correctly identified:

\[ Recall = \frac{TP}{TP + FN} \times 100 \]

Here, \(TP\), \(FP\), and \(FN\) represent true positives, false positives, and false negatives.

12. Results and Interpretation

The experiment shows very high performance across several classifiers. The total feature set contains 117 features, while CFS and PCA reduce the number to 20 and 48 features respectively.

The best accuracy reported is 100%. ANN achieves 100% accuracy across all experimental scenarios, including no feature selection, CFS-selected features, and PCA-selected features. KNN and SVM also achieve 100% in several cases, but ANN is described as the most robust classifier because it performs optimally across all tested feature sets and k-fold values.

Classifier Observed Performance Interpretation
ANN 100% accuracy across all scenarios Most robust classifier in this study.
KNN Often reaches 100% accuracy Strong performance, especially with complete or selected features.
SVM Often reaches 100% accuracy Strong classifier for this feature space.
Naïve Bayes Can reach 100% with all features Performance is more dependent on feature set.
Decision Tree Lowest reported accuracy in some scenarios Less robust than ANN, KNN, and SVM for this dataset.
C4.5 High but not always perfect Performs well but below the strongest classifiers.

One important finding is that CFS reduces the features by more than 80% while maintaining maximum classification performance. This shows that only a small subset of well-selected color and texture features can be highly discriminative for sarong classification.

Main result: The combination of color moments, GLCM, LBP, CFS feature selection, and ANN classification provides a compact and highly accurate sarong motif recognition system.

13. Relevance for Saree and Textile Classification

Although the paper studies Indonesian sarong fabric, the method is highly relevant for Indian saree classification and textile heritage research. Many saree types also depend on combinations of color, texture, motif geometry, and regional pattern identity.

The method is especially useful as a baseline for traditional textile classification because it uses interpretable handcrafted features. Unlike deep-learning models that may require large datasets, this approach can work well when features are carefully designed and selected.

Paper Concept Possible Saree Research Use
Color moments Capture dominant color identity of saree body, border, and pallu.
GLCM Capture woven texture, repeat structure, and contrast differences.
LBP Capture local texture and micro-patterns in fabric images.
CFS feature selection Identify the most useful visual features for craft classification.
ANN classifier Classify saree categories using selected handcrafted features.

For saree-origin classification, this approach could be adapted to classify Banarasi, Kanjivaram, Gadwal, Ilkal, Paithani, Kota, Kalamkari, and other craft clusters. However, saree images may require additional region-based analysis because the border, pallu, and body may carry different classification signals.

14. Limitations and Future Scope

The paper reports excellent results, but some limitations should be considered. The images were captured under controlled indoor lighting and with a specific acquisition method. Real-world textile images may include folds, shadows, different cameras, different lighting, occlusion, and complex backgrounds.

The non-Samarinda class contains several pattern types, but it is treated as a single class. In future work, this class could be subdivided into more specific categories. A larger dataset with more diverse acquisition conditions would also help test generalization.

The study relies on handcrafted features. These are interpretable and efficient, but future work may compare them with CNN, Vision Transformer, or hybrid deep-learning models.

Limitation Suggested Improvement
Controlled image acquisition Test on real-world images with varied lighting and backgrounds.
Broad non-Samarinda class Split into more specific motif or regional categories.
Handcrafted feature dependency Compare with CNN, transfer learning, and transformer-based models.
Limited textile components Extend to region-wise analysis of body, border, and motif zones.
High accuracy on one dataset Validate with external datasets to test generalization.

15. Simple Summary

This paper proposes a computer-vision and machine-learning method for classifying Samarinda sarong motifs. The method extracts color features using color moments from multiple color spaces and texture features using GLCM and LBP. It then reduces the feature set using CFS or PCA and classifies the sarong images using machine-learning models.

The dataset contains 1000 images across six classes. The best-performing approach reaches 100% accuracy, with ANN being the most robust classifier across all tested scenarios. CFS is especially useful because it reduces the feature count from 117 to 20 while maintaining maximum performance.

For textile and saree research, the paper is useful because it shows how carefully selected color and texture features can classify traditional fabrics with high accuracy. It also provides a strong baseline for cultural textile preservation using computer vision.

16. General Disclaimer

This article is an educational explanation of the research paper “Pattern Recognition of Sarong Fabric Using Machine Learning Approach Based on Computer Vision for Cultural Preservation.” It is intended for conceptual understanding, academic discussion, and research learning. Some technical details have been simplified for readability. For exact methodology, equations, experimental setup, feature lists, and complete numerical results, readers should refer to the original paper.

```

No comments:

Post a Comment

Understading the Paper: Fine Grained Image Analysis with Deep Learning

Fine-Grained Image Analysis with Deep Learning: A Simple Explanation In ordinary image classification, a computer vision model may be...