Metadata-Version: 2.1
Name: imhist
Version: 0.0.2
Summary: This model calculates the histogram, PMF and CMD of a given matrix fast.
Home-page: https://github.com/Mamdasn/imhist
Author: mamdasn s
Author-email: <mamdassn@gmail.com>
License: UNKNOWN
Keywords: python,histogram,pmf,cdf,histogram of image
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: numpy


# imhist  
This model calculates the histogram, PMF and CMD of a given matrix fast.  

# Usage  
```python
import cv2
import numpy as np
from imhist import imhist, imcdf
import matplotlib.pyplot as plt

img = cv2.imread('assets/Plane.jpg')
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
v = hsv[:, :, 2].copy()

v_hist = imhist(v)

plt.figure(num=1)
plt.plot(np.arange(256), v_hist, 'b', label='Histogram')
plt.ylabel('Number of Occurrences')
plt.xlabel('Brightness')
plt.grid(which="both")
plt.legend()
plt.show()
```  
# Output
This is a sample image:  
![Sample Image](https://raw.githubusercontent.com/Mamdasn/imhist/main/assets/Plane.jpg "Sample Image")  
Histogram of the sample image:  
![Histogram of the Sample Image](https://raw.githubusercontent.com/Mamdasn/imhist/main/assets/Plane-Histogram.jpg "Histogram of the Sample Image")


