An open API service indexing awesome lists of open source software.

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

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%;
}