imhist


Nameimhist JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/Mamdasn/imhist
SummaryThis model calculates the histogram, PMF and CMD of a given matrix fast.
upload_time2021-05-02 16:39:42
maintainer
docs_urlNone
authormamdasn s
requires_python
license
keywords python histogram pmf cdf histogram of image
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# imhist  
This model calculates the histogram, PMF and CMD of a given image fast.  

## Installation

Run the following to install:

```python
pip install imhist
```

## 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)
v_pmf = imhist(v, PMF=True)
v_cdf = imcdf(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")



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Mamdasn/imhist",
    "name": "imhist",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,histogram,pmf,cdf,histogram of image",
    "author": "mamdasn s",
    "author_email": "<mamdassn@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/04/9c/2a4f04aab4e18cdd6251ee0c040ea2b5229cc3c47ad9b8e2a3891eb213d6/imhist-0.0.4.tar.gz",
    "platform": "",
    "description": "\n# imhist  \nThis model calculates the histogram, PMF and CMD of a given image fast.  \n\n## Installation\n\nRun the following to install:\n\n```python\npip install imhist\n```\n\n## Usage  \n```python\nimport cv2\nimport numpy as np\nfrom imhist import imhist, imcdf\nimport matplotlib.pyplot as plt\n\nimg = cv2.imread('assets/Plane.jpg')\nhsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)\nv = hsv[:, :, 2].copy()\n\nv_hist = imhist(v)\nv_pmf = imhist(v, PMF=True)\nv_cdf = imcdf(v)\n\nplt.figure(num=1)\nplt.plot(np.arange(256), v_hist, 'b', label='Histogram')\nplt.ylabel('Number of Occurrences')\nplt.xlabel('Brightness')\nplt.grid(which=\"both\")\nplt.legend()\nplt.show()\n```  \n## Output\nThis is a sample image:  \n![Sample Image](https://raw.githubusercontent.com/Mamdasn/imhist/main/assets/Plane.jpg \"Sample Image\")  \nHistogram of the sample image:  \n![Histogram of the Sample Image](https://raw.githubusercontent.com/Mamdasn/imhist/main/assets/Plane-Histogram.jpg \"Histogram of the Sample Image\")\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This model calculates the histogram, PMF and CMD of a given matrix fast.",
    "version": "0.0.4",
    "split_keywords": [
        "python",
        "histogram",
        "pmf",
        "cdf",
        "histogram of image"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "77b73b71299b0c788d237a2cd79d151a",
                "sha256": "01179e7db8d135bf60576a1e2a51c663cc781fa693d25ae8362d248686312e6a"
            },
            "downloads": -1,
            "filename": "imhist-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "77b73b71299b0c788d237a2cd79d151a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 2821,
            "upload_time": "2021-05-02T16:39:37",
            "upload_time_iso_8601": "2021-05-02T16:39:37.731264Z",
            "url": "https://files.pythonhosted.org/packages/79/77/fa41252751afeaff464bc4315ef2f057c7dec2aee2c158c497171f952b45/imhist-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "4abeb2446f93e698f1e1a778764781f8",
                "sha256": "0b92218bde95780e60fb5030d48b82d7cda57c3275397f4a070f166df6a77412"
            },
            "downloads": -1,
            "filename": "imhist-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "4abeb2446f93e698f1e1a778764781f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 176410,
            "upload_time": "2021-05-02T16:39:42",
            "upload_time_iso_8601": "2021-05-02T16:39:42.577589Z",
            "url": "https://files.pythonhosted.org/packages/04/9c/2a4f04aab4e18cdd6251ee0c040ea2b5229cc3c47ad9b8e2a3891eb213d6/imhist-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-05-02 16:39:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "Mamdasn",
    "error": "Could not fetch GitHub repository",
    "lcname": "imhist"
}
        
Elapsed time: 0.21832s