
# LT-LBP: Logarithmic Transformation Local Binary Pattern

![PyPI](https://img.shields.io/pypi/v/ltlbp)
![Python](https://img.shields.io/pypi/pyversions/ltlbp)
![License](https://img.shields.io/badge/license-MIT-green)

**LT-LBP (Logarithmic Transformation – Local Binary Pattern)** is a lightweight Python library for texture analysis and feature extraction from grayscale images.

---

## Mathematical Definition

$$
LT{-}LBP = \sum_{p=0}^{7} s(g_c - g_p) \cdot p
$$

where:

s(x) = 1 if x > 0  
s(x) = 0 otherwise  

Here, g_c is the center pixel intensity and g_p are its 8 neighboring pixels (clockwise).

This method is robust for illuminated and low-light images, making it ideal for applications in:

- Face recognition  
- Texture classification  
- Medical image analysis  
- Surveillance  
- Industrial inspection  

---

## Features

- Compute LT-LBP for any grayscale image  
- Generate normalized histogram feature vectors for machine learning models  
- Fully vectorized NumPy implementation  
- Lightweight and easy to integrate  
- Suitable for research and reproducible experiments  

---

## Installation

```bash
pip install ltlbp


## License

MIT License



## Citation

If you use LT-LBP in your research, please cite:

@article{pankaja2023ltlbp,
  title   = {LT-LBP-Based Spatial Texture Feature Extraction with Deep Learning for X-Ray Images},
  author  = {Lakshmi, Pankaja and Sivagami, M.},
  journal = {Journal of Computer Science},
  volume  = {20},
  number  = {1},
  pages   = {106--120},
  year    = {2023},
  doi     = {10.3844/jcssp.2024.106.120},
  url     = {https://thescipub.com/abstract/jcssp.2024.106.120}
}

The LT-LBP Python implementation is publicly available at:
https://pypi.org/project/ltlbp/
