{ "info": { "author": "Camilo Vejarano", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Multimedia :: Graphics", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Visualization" ], "description": "# cmapy\n\nUse Matplotlib colormaps with OpenCV in Python.\n\nMatplotlib provides a lot of [nice colormaps](https://matplotlib.org/tutorials/colors/colormaps.html). Cmapy exposes these colormaps as lists of colors that can be used with OpenCV to colorize images or for other drawing tasks in Python.\n\n| Original image | ![](https://gitlab.com/cvejarano-oss/cmapy/raw/master/examples/imgs/gradient.png) | ![](https://gitlab.com/cvejarano-oss/cmapy/raw/master/examples/imgs/jupiter.png) | ![](https://gitlab.com/cvejarano-oss/cmapy/raw/master/examples/imgs/woman.png) |\n| -- | -- | -- | -- |\n|viridis|![](https://gitlab.com/cvejarano-oss/cmapy/raw/master/docs/imgs/gradient_viridis.png)|![](https://gitlab.com/cvejarano-oss/cmapy/raw/master/docs/imgs/jupiter_viridis.png)|![](https://gitlab.com/cvejarano-oss/cmapy/raw/master/docs/imgs/woman_viridis.png)|\n\nSee all of the available colormaps as of Matplotlib 2.2.3 in this [all colormaps example](https://gitlab.com/cvejarano-oss/cmapy/blob/master/docs/colorize_all_examples.md).\n\n## Requirements\n\n* Python 2.7 or 3.\n* Matplotlib.\n* OpenCV >= 3.3.0 (to use cv2.applyColorMap()).\n\n## Installation\n\nPython 2.7, with pip:\n\n```bash\npip install cmapy\n```\n\nPython 3.x, with pip:\n\n```bash\npip3 install cmapy\n```\n\nOr, in a Conda environment:\n\n```bash\nconda install -c conda-forge cmapy \n```\n\n## How to use\n\n### Colorize images\n\nColorize means to apply a colormap to an image. This is done by getting the colormap\nwith cmapy.cmap() and then applying cv2.applyColorMap(), like this:\n\n```python\nimg_colorized = cv2.applyColorMap(img, cmapy.cmap('viridis'))\n```\n\nAlternatively, you can use cmapy.colorize() directly:\n\n```python\nimg_colorized = cmapy.colorize(img, 'viridis')\n```\n\nSee the full [colorize example](https://gitlab.com/cvejarano-oss/cmapy/blob/master/examples/colorize.py).\n\n### Draw with colors\n\nUse the cmapy.color() function and an index between 0 and 255 to get a color \nfrom a colormap. Cmapy.color() returns a list of BGR (or RGB) values that can be\nused with OpenCV drawing functions.\n\n```python\n# Get color in BGR order (default) by index.\nbgr_color = cmapy.color('viridis', 127)\n\n# Get color in RGB order with a float value.\nrgb_color = cmapy.color('viridis', 0.5, rgb_order=True)\n```\n\nSee a complete [drawing with colors example](https://gitlab.com/cvejarano-oss/cmapy/blob/master/examples/draw_with_colors.py).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/cvejarano-oss/cmapy/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cmapy", "package_url": "https://pypi.org/project/cmapy/", "platform": "", "project_url": "https://pypi.org/project/cmapy/", "project_urls": { "Bug Reports": "https://gitlab.com/cvejarano-oss/cmapy/issues/", "Homepage": "https://gitlab.com/cvejarano-oss/cmapy/" }, "release_url": "https://pypi.org/project/cmapy/0.6/", "requires_dist": null, "requires_python": ">=2.7", "summary": "Use Matplotlib colormaps with OpenCV in Python.", "version": "0.6" }, "last_serial": 5863967, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9b1cd8400ff0e76d3dd0fb865913bccd", "sha256": "5098685415b28fe451d6ab8fc8c6b07015ae4a91ba4b94af825104eb8696631e" }, "downloads": -1, "filename": "cmapy-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9b1cd8400ff0e76d3dd0fb865913bccd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1263, "upload_time": "2018-09-12T13:08:43", "url": "https://files.pythonhosted.org/packages/dc/f4/bb642f8bf7ed5d4d693e5b257b30f7c8de3c638ad57eac1026ef83f29aba/cmapy-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1046984ba4949792ade903e225a554fa", "sha256": "107e08b64e1e00b9bb6839ec33f7c02a4ddd6a1e7688cbda83c4b58c34c294b4" }, "downloads": -1, "filename": "cmapy-0.1.tar.gz", "has_sig": false, "md5_digest": "1046984ba4949792ade903e225a554fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1208, "upload_time": "2018-09-12T13:08:44", "url": "https://files.pythonhosted.org/packages/99/f2/3610c5d0cb7a6c9438a607017bfdd0f43d88d5a3297fb7b481416a2026d3/cmapy-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6812ae2ab55477eee34b0a1ae79c817c", "sha256": "958e9f6756a36b21623e763e4d09c8a3cf394de6e0e0dc846058dee6173afd3d" }, "downloads": -1, "filename": "cmapy-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6812ae2ab55477eee34b0a1ae79c817c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1323, "upload_time": "2018-09-25T12:21:01", "url": "https://files.pythonhosted.org/packages/83/ef/88ed185c48303be33e24e6b7e8fc5d027f729baca338eb2d68e6e2454e97/cmapy-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6dd7f54883c0a6038feb15cb6f4faa9d", "sha256": "eef40045b0204937d28d465d16e24c4c1a6db45e41529dd5efd3dc8efc26066a" }, "downloads": -1, "filename": "cmapy-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6dd7f54883c0a6038feb15cb6f4faa9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1285, "upload_time": "2018-09-25T12:21:02", "url": "https://files.pythonhosted.org/packages/c0/40/c5be32c23eb66a646cd84ef298b5d8ecbaaf7345d7c39886e8d8502a0c4c/cmapy-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f8c364427d3aae0bb44006c567369418", "sha256": "65d1895b0d39a54da5298ab90d21e37d62ba8fc517af4b31b96b050372e210f3" }, "downloads": -1, "filename": "cmapy-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f8c364427d3aae0bb44006c567369418", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1663, "upload_time": "2018-10-03T09:46:20", "url": "https://files.pythonhosted.org/packages/a6/f5/6d6c9802611308b65336eab32d5aeb67d6857bf0107ba4799f6d574d7478/cmapy-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ca1ad466e69529762ee08a6629b2ae18", "sha256": "38f6a63a091483341b4d86063057bd1c286881fefefb063cbbf40a06d0c24c17" }, "downloads": -1, "filename": "cmapy-0.1.3.tar.gz", "has_sig": false, "md5_digest": "ca1ad466e69529762ee08a6629b2ae18", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1667, "upload_time": "2018-10-04T12:20:22", "url": "https://files.pythonhosted.org/packages/cd/b5/1dddf380cb7e8b13378f20ee3fc2906fe9d38b305ee91833166596923bfb/cmapy-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "1a4348c04b218b81c0229a2515306ed3", "sha256": "feb4b41360121e9fdc4ac2f49cc2a1e91332f32518dd6ea8b45f14d55b532fd0" }, "downloads": -1, "filename": "cmapy-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1a4348c04b218b81c0229a2515306ed3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1654, "upload_time": "2018-10-04T12:54:04", "url": "https://files.pythonhosted.org/packages/73/89/e7774a0ae4be60a86c9d6f6083d4359dc043aa086be7f4398d4bbb57c21a/cmapy-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "41f3595a849086909fb48119c3df2ede", "sha256": "be067eca4bb962610207035ae6c231451dd195f7b541fdf275583d344fdc9752" }, "downloads": -1, "filename": "cmapy-0.1.5.tar.gz", "has_sig": false, "md5_digest": "41f3595a849086909fb48119c3df2ede", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 2588, "upload_time": "2018-10-04T13:48:34", "url": "https://files.pythonhosted.org/packages/e4/21/36b0516d9a38b3b55c4bda9695e4b0a9b18a30a82f4cc02815bd66485da4/cmapy-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "abe92b9190496d2c0a5e53d9887e5a3e", "sha256": "10d519f36f386f26148c5dc45e2565f1762e3da226ce504181de244d4fad1180" }, "downloads": -1, "filename": "cmapy-0.1.6.tar.gz", "has_sig": false, "md5_digest": "abe92b9190496d2c0a5e53d9887e5a3e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 2581, "upload_time": "2018-10-04T13:53:32", "url": "https://files.pythonhosted.org/packages/40/90/5f5a62d568204e9b62a23f8d698f4e625bbfe1042e0c57bf47d61ec4cbd7/cmapy-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "26fd86fdbb7eb8fc3e80ba6eda7a540c", "sha256": "cbb2fb81f707d7d304af9f8b26d8d0fd2b1dd938d10f4cacb01b1cd24cc90f56" }, "downloads": -1, "filename": "cmapy-0.1.7.tar.gz", "has_sig": false, "md5_digest": "26fd86fdbb7eb8fc3e80ba6eda7a540c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 2892, "upload_time": "2018-10-04T14:58:04", "url": "https://files.pythonhosted.org/packages/82/e4/4952036fa68413bc3984df0c8ee701587a7327d57831b3c79201f8a8a790/cmapy-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "f3a150d5fa7be00233fceceb5c31a5b0", "sha256": "88e816ed98e070f8c80861c769d40a5a752a00d4117f5a008c2badee87d1c612" }, "downloads": -1, "filename": "cmapy-0.1.8.tar.gz", "has_sig": false, "md5_digest": "f3a150d5fa7be00233fceceb5c31a5b0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 2932, "upload_time": "2018-10-04T14:59:19", "url": "https://files.pythonhosted.org/packages/8d/ae/d7aacbd2515b471d8cff92b0915c8900b5515f41d50ac04227c0f424f1be/cmapy-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "f98471a82e8276955ea0c1d36899c068", "sha256": "80398b3852160a3cd4f8e235b70f23f0e14eb3120ce9da28bdc699068a907e8a" }, "downloads": -1, "filename": "cmapy-0.1.9.tar.gz", "has_sig": false, "md5_digest": "f98471a82e8276955ea0c1d36899c068", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 2937, "upload_time": "2018-10-05T14:26:11", "url": "https://files.pythonhosted.org/packages/4a/8c/49ef6f0b2dacc3b07152da305583212e4b2a166eb73ca54e554243254424/cmapy-0.1.9.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "702621fab5aa1040cc16395a7bb3abbf", "sha256": "3b6f9b4202ed65fef36b5677d69edff8a569cc03cd0d7f0b8f52b89a0f66173c" }, "downloads": -1, "filename": "cmapy-0.2.tar.gz", "has_sig": false, "md5_digest": "702621fab5aa1040cc16395a7bb3abbf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3568, "upload_time": "2018-11-14T16:53:17", "url": "https://files.pythonhosted.org/packages/cc/df/31553ddbdaef95847186eb2d5b43d06de16e4cc7b7a06874a2aa537e69d5/cmapy-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "495bfd7ab4c3808be65a5cd05f38ce01", "sha256": "d6928d986675eb33296c73a39c24d591d8522c92bc24bd2acbaae4eee211ece8" }, "downloads": -1, "filename": "cmapy-0.3.tar.gz", "has_sig": false, "md5_digest": "495bfd7ab4c3808be65a5cd05f38ce01", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 3697, "upload_time": "2019-04-10T19:59:55", "url": "https://files.pythonhosted.org/packages/74/d2/3d06d262a3d91e4434276ed1392d02b71bbc1c252ec67481ec512c9999e4/cmapy-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "d4b7b8e427542ebf77a81df05834e81a", "sha256": "d51fa6d2e4b671b680db1e7bef5eaf96654f5397ff94f69f6227b1a4dd2d8408" }, "downloads": -1, "filename": "cmapy-0.4.tar.gz", "has_sig": false, "md5_digest": "d4b7b8e427542ebf77a81df05834e81a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 3700, "upload_time": "2019-04-10T20:19:15", "url": "https://files.pythonhosted.org/packages/43/14/16d8d2979a9e8402ac42d12c4697b8e409a48d6a34d9126ae7b7ca104550/cmapy-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "5d2f54f3f678123c422c37119a44153a", "sha256": "741d27a56e4c836bbad3fffe3c99fdf3c206313301efcb43b52de9e87ae256f1" }, "downloads": -1, "filename": "cmapy-0.5.tar.gz", "has_sig": false, "md5_digest": "5d2f54f3f678123c422c37119a44153a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 3947, "upload_time": "2019-04-12T20:06:20", "url": "https://files.pythonhosted.org/packages/ef/d3/c07e566d817931c08899a88148f563183bfa728dbb8478ea8de08c4b7867/cmapy-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "5ed9eb06535fd48c85054f38783705fc", "sha256": "0599246be87b916047b6c2f00995436119efefc46779a7225aef5984c4e0bbb9" }, "downloads": -1, "filename": "cmapy-0.6.tar.gz", "has_sig": false, "md5_digest": "5ed9eb06535fd48c85054f38783705fc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 3951, "upload_time": "2019-04-12T20:45:56", "url": "https://files.pythonhosted.org/packages/30/08/9664ec9ae75836435e1d2482eea6253d00e35ede1d2187af48bfc94f96a3/cmapy-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5ed9eb06535fd48c85054f38783705fc", "sha256": "0599246be87b916047b6c2f00995436119efefc46779a7225aef5984c4e0bbb9" }, "downloads": -1, "filename": "cmapy-0.6.tar.gz", "has_sig": false, "md5_digest": "5ed9eb06535fd48c85054f38783705fc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 3951, "upload_time": "2019-04-12T20:45:56", "url": "https://files.pythonhosted.org/packages/30/08/9664ec9ae75836435e1d2482eea6253d00e35ede1d2187af48bfc94f96a3/cmapy-0.6.tar.gz" } ] }