← Back to Portfolio

Research Project · Acoustic Sensing

Fabric Classification

A prototype that analyzes acoustic signals from fabric and identifies material differences using waveform- and frequency-domain features.

  • Machine Learning
  • Python
  • Acoustic Sensing
  • Signal Processing
  • Textile
Acoustic waveform over a woven fabric pattern

Overview

Rather than embedding 0 and 1, this project identifies naturally occurring acoustic differences between fabrics. A piezoelectric contact microphone records each swipe, and the software detects the scratch event before classifying its material.

Implementation Workflow

01 · Capture

Fabric vibration to USB audio

A swipe travels through a piezo sensor, an LM358 conditioning circuit with adjustable gain, and a USB audio interface to the computer as a 48 kHz raw waveform.

02 · Detect

Find each scratch with Line Length

For every 5 ms window, the system sums the absolute difference between adjacent samples. A calibrated baseline sets the threshold; three consecutive abnormal windows start an event and three normal windows end it. Very short activity is rejected, then a fixed raw window is centered on the event midpoint.

03 · Describe

Extract 15 acoustic features

Five time-domain descriptors capture level and envelope shape, six log-power bands summarize 100–9,000 Hz energy with Welch PSD, and four spectral-shape descriptors measure centroid, bandwidth, flatness, and 85% rolloff.

04 · Classify

Run the same pipeline in real time

The feature vector is standardized and classified by an RBF SVM, evaluated with stratified five-fold cross-validation. The real-time classifier applies the identical feature extractor directly to each detected raw event.

Application: Fabric Game Controller

The recognized fabric label can be mapped to an application command. In the current proof of concept, detecting the black fabric sends one Space keypress, turning a fabric swipe into the jump control for Chrome Dino.