https://github.com/arsho/local_binary_patterns
Local Binary Patterns implementation using Python3 and OpenCV
https://github.com/arsho/local_binary_patterns
lbp localbinarypatterns opencv-python
Last synced: about 2 months ago
JSON representation
Local Binary Patterns implementation using Python3 and OpenCV
- Host: GitHub
- URL: https://github.com/arsho/local_binary_patterns
- Owner: arsho
- Created: 2017-03-01T17:22:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T13:53:35.000Z (over 8 years ago)
- Last Synced: 2025-04-30T05:47:49.284Z (about 2 months ago)
- Topics: lbp, localbinarypatterns, opencv-python
- Language: Python
- Size: 1.33 MB
- Stars: 90
- Watchers: 3
- Forks: 35
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Local Binary Patterns implementation using Python 3
`Local Binary Pattern (LBP)` is a simple yet very efficient texture operator which labels the pixels of an image by thresholding the neighborhood of each pixel and considers the result as a binary number.
[Click here to learn more.](http://www.scholarpedia.org/article/Local_Binary_Patterns "Local Binary Pattern (LBP)")Moreover, I also added a pattern code for two bins only to compare the result of LBP and two bin pattern.
## Packages Used
The program is coded using Windows 10 (64 bit) operating system with Python version 3.5.2.The following packages are necessary to run the program:
Package | Version | Installation
--- | --- | ---
**OpenCV** | 3.2.0 | `pip install opencv-python`
**Numpy** | 1.11.3 | `pip install numpy`
**Matplotlib** | 1.5.3 | `pip install matplotlib`## Image Used

* [Click to download original image of Lena Söderberg](https://raw.githubusercontent.com/arsho/local_binary_patterns/master/lenna.jpg "Lena Söderberg")### Output of `lbp.py`
The output consists of the gray scale image, LBP representation image and LBP histogram.
### Output of `two_bin.py`
The output consists of the gray scale image, Two Bin representation image and Two Bin histogram.
### References
* [Local Binary Patterns with Python & OpenCV](http://www.pyimagesearch.com/2015/12/07/local-binary-patterns-with-python-opencv/ "Local Binary Patterns with Python & OpenCV")
* [Local Binary Patterns Wiki](https://en.wikipedia.org/wiki/Local_binary_patterns "Local Binary Patterns Wiki")***
### Feel free to contribute for improvement.