https://github.com/ghnmqdtg/image_histogram_equalization
A project to implement the histogram equalization with Python
https://github.com/ghnmqdtg/image_histogram_equalization
histogram-equalization python
Last synced: 10 months ago
JSON representation
A project to implement the histogram equalization with Python
- Host: GitHub
- URL: https://github.com/ghnmqdtg/image_histogram_equalization
- Owner: ghnmqdtg
- License: mit
- Created: 2022-10-21T09:44:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-16T06:41:51.000Z (over 3 years ago)
- Last Synced: 2025-04-04T04:26:59.830Z (about 1 year ago)
- Topics: histogram-equalization, python
- Language: Python
- Homepage:
- Size: 1.76 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Histogram Equalization with Python
## Introduction
This project is to implement histogram equalization with Python. You can put the target image in folder `./src` and set the configurations in `./config`. For details, please refer to the comments in the codes.
## Results
## Input and Output
> For the example image, I decreased the brightness of the original image and converted it to grayscale.
Input image
Output image
## Analysis
The following two plots compare the PDF (Probability Density Function) and CDF (cumulative distribution function) of input and output images.
As you can see, after applying the histogram equalization, the pixel intensity distribution (PDF) becomes more dispersed. And the CDF is uniformly distributed.
PDF
CDF
## Development Environment
```
Python 3.9.6
MacOS 12.6
```
## How to use it?
1. Install the dependencies
```shell
pip install -r requirements.txt
```
2. Update the `config.py` if needed
3. Run the `main.py`
```shell
python main.py
```
td {
/* border:black thin solid; */
max-width:50%;
width:50%;
}
table {
width:100%;
}