This Python toolkit is designed for advanced fabric texture analysis using statistical methods, enabling the extraction and examination of texture features. Intended for integration into a larger tool, it will be used by students in the Signal, Image and Video course to visually create signal processing workflows. The module emphasizes clear documentation and a user-friendly interface, ensuring seamless integration and ease of use in future educational settings.
- Autocorrelation Function (ACF)
- Local Binary Patterns (LBP)
- Co-Occurrence Matrices (CoOccur)
- Clone the repository in your project
git clone https://github.com/MatteoZanella/siv-texture-analysis.git
- Install the requirements
cd siv-texture-analysis
pip install -r requirements.txt
- Import the modules in your code
from texture.analysis import ACF, CoOccur, LBP
from PIL import Image
# Load an image
image = Image.open('./tests/textures/lena.png')
# Compute Autocorrelation Function
acf = ACF(image)
# Compute Local Binary Patterns
lbp = LBP(image)
# Compute Co-Occurrence Matrices
com = CoOccur(image)
To run the test suite, use Python's unittest module:
# Run all tests
python -m unittest discover -s tests