Name | cv-algorithms JSON |
Version |
1.1.1
JSON |
| download |
home_page | |
Summary | Optimized OpenCV extra algorithms for Python |
upload_time | 2023-12-13 02:04:29 |
maintainer | |
docs_url | None |
author | Uli Köhler |
requires_python | >=3.5,<4.0 |
license | Apache-2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# cv_algorithms

A Python package (Python3 ready!) that contains implementations of various OpenCV algorithms are are not
available in OpenCV or OpenCV-contrib. This package is intended to be used with OpenCV 3.
Some performance-critical algorithms are written in optimized C code. The C code is accessed using [cffi](https://cffi.readthedocs.io/en/latest/)
Currently implemented:
- Morphological algorithms
- [Guo-Hall thinning (C-optimized)](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/Thinning.md)
- [Zhang-Suen thinning (C-optimized)](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/Thinning.md)
- [Difference-of-Gaussian transform](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/DoG.md)
- Algorithms on contours
- Masking extraction of convex polygon area from image without rotation
- Scale around reference point or center
- Fast computation of center by coordinate averaging
- Center-invariant rescaling of upright bounding rectangle by x/ factors
- Filter by min/max area
- Sort by area
- Create binary contour mask
- [Grassfire transform](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/Grassfire.md)
- Colorspace metrics & utilities:
- Convert image to any colorspace supported by OpenCV
- Extract any channel from any colorspace directly
- Euclidean RGB distance
- Other structural algorithms
- Which neighboring pixels are set in a binary image?
- Algorithms on text rendering
- Center text at coordinates
- Auto-scale text to fix into box
- Other algorithms
- Remove n percent of image borders
- Popcount (number of one bits) for 8, 16, 32 and 64 bit numpy arrays
- Resize an image, maintaining the aspect ratio
As OpenCV's Python bindings (`cv2`) represents images as [numpy](http://www.numpy.org/) arrays, most algorithms generically work with *numpy*1 arrays.
## Installation
Install the *stable* version:
``` {.sourceCode .bash}
pip install cv_algorithms
```
How to install the *bleeding-edge* version from GitHub
``` {.sourceCode .bash}
pip install git+https://github.com/ulikoehler/cv_algorithms.git
```
How to *build yourself* - we use [Poetry](https://python-poetry.org/):
```sh
poetry build
```
Potentially, you need to [install OpenCV](https://techoverflow.net/2022/01/23/how-to-fix-python-modulenotfounderror-no-module-named-cv2-on-windows/) if not already present. I recommend first trying to install without that, since modern Python versions will take care of that automatically.
## Usage
[Difference of Gaussian transform documentation & example](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/DoG.md)
[Grassfire transform documentation & example](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/Grassfire.md)
[Thinning documentation & example](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/Thinning.md)
Here\'s a simple usage showcase:
``` {.sourceCode .python}
import cv_algorithms
# img must be a binary, single-channel (grayscale) image.
thinned = cv_algorithms.guo_hall(img)
```
## Contributions
Contributions of any shape or form are welcome. Please submit a pull
request or file an issue on GitHub.
Copyright (c) 2016-2022 Uli Köhler \<<cv_algorithms@techoverflow.net>\>
Raw data
{
"_id": null,
"home_page": "",
"name": "cv-algorithms",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Uli K\u00f6hler",
"author_email": "github@techoverflow.net",
"download_url": "https://files.pythonhosted.org/packages/a7/60/be78c55a39b7bbc22ef347a3ca05f0664adbc1339fcd714170d9098b317a/cv_algorithms-1.1.1.tar.gz",
"platform": null,
"description": "# cv_algorithms\n\n\nA Python package (Python3 ready!) that contains implementations of various OpenCV algorithms are are not\navailable in OpenCV or OpenCV-contrib. This package is intended to be used with OpenCV 3.\n\nSome performance-critical algorithms are written in optimized C code. The C code is accessed using [cffi](https://cffi.readthedocs.io/en/latest/)\nCurrently implemented:\n- Morphological algorithms\n - [Guo-Hall thinning (C-optimized)](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/Thinning.md)\n - [Zhang-Suen thinning (C-optimized)](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/Thinning.md)\n - [Difference-of-Gaussian transform](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/DoG.md)\n- Algorithms on contours\n - Masking extraction of convex polygon area from image without rotation\n - Scale around reference point or center\n - Fast computation of center by coordinate averaging\n - Center-invariant rescaling of upright bounding rectangle by x/ factors\n - Filter by min/max area\n - Sort by area\n - Create binary contour mask\n - [Grassfire transform](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/Grassfire.md)\n- Colorspace metrics & utilities:\n - Convert image to any colorspace supported by OpenCV\n - Extract any channel from any colorspace directly\n - Euclidean RGB distance\n- Other structural algorithms\n - Which neighboring pixels are set in a binary image?\n- Algorithms on text rendering\n - Center text at coordinates\n - Auto-scale text to fix into box\n- Other algorithms\n - Remove n percent of image borders\n - Popcount (number of one bits) for 8, 16, 32 and 64 bit numpy arrays\n - Resize an image, maintaining the aspect ratio\n\nAs OpenCV's Python bindings (`cv2`) represents images as [numpy](http://www.numpy.org/) arrays, most algorithms generically work with *numpy*1 arrays.\n\n## Installation\n\nInstall the *stable* version:\n\n``` {.sourceCode .bash}\npip install cv_algorithms\n```\n\nHow to install the *bleeding-edge* version from GitHub\n\n``` {.sourceCode .bash}\npip install git+https://github.com/ulikoehler/cv_algorithms.git\n```\n\nHow to *build yourself* - we use [Poetry](https://python-poetry.org/):\n```sh\npoetry build\n```\n\nPotentially, you need to [install OpenCV](https://techoverflow.net/2022/01/23/how-to-fix-python-modulenotfounderror-no-module-named-cv2-on-windows/) if not already present. I recommend first trying to install without that, since modern Python versions will take care of that automatically.\n\n## Usage\n\n[Difference of Gaussian transform documentation & example](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/DoG.md)\n[Grassfire transform documentation & example](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/Grassfire.md)\n[Thinning documentation & example](https://github.com/ulikoehler/cv_algorithms/blob/master/doc/Thinning.md)\n\nHere\\'s a simple usage showcase:\n\n``` {.sourceCode .python}\nimport cv_algorithms\n# img must be a binary, single-channel (grayscale) image.\nthinned = cv_algorithms.guo_hall(img)\n```\n\n## Contributions\n\nContributions of any shape or form are welcome. Please submit a pull\nrequest or file an issue on GitHub.\n\nCopyright (c) 2016-2022 Uli K\u00f6hler \\<<cv_algorithms@techoverflow.net>\\>\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Optimized OpenCV extra algorithms for Python",
"version": "1.1.1",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b2c62d78a2b5a3435b07f546a4b0e1cecf906c56e9a4f8a35082fa1fa80c88ed",
"md5": "0b7bdef0682b3c0095a6cf677ed9c887",
"sha256": "7937a313c48346903314c75bd3f8884310b3d3406c2b35cdca1e2778633d7d8e"
},
"downloads": -1,
"filename": "cv_algorithms-1.1.1-cp310-cp310-manylinux_2_35_x86_64.whl",
"has_sig": false,
"md5_digest": "0b7bdef0682b3c0095a6cf677ed9c887",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.5,<4.0",
"size": 40895,
"upload_time": "2023-12-13T02:04:27",
"upload_time_iso_8601": "2023-12-13T02:04:27.128340Z",
"url": "https://files.pythonhosted.org/packages/b2/c6/2d78a2b5a3435b07f546a4b0e1cecf906c56e9a4f8a35082fa1fa80c88ed/cv_algorithms-1.1.1-cp310-cp310-manylinux_2_35_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a760be78c55a39b7bbc22ef347a3ca05f0664adbc1339fcd714170d9098b317a",
"md5": "2e6aca042e69289c0432c54fac580334",
"sha256": "627653e8235414f4e0747ee682b001710002ea408c81c65d78ee368763586077"
},
"downloads": -1,
"filename": "cv_algorithms-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "2e6aca042e69289c0432c54fac580334",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5,<4.0",
"size": 22231,
"upload_time": "2023-12-13T02:04:29",
"upload_time_iso_8601": "2023-12-13T02:04:29.126286Z",
"url": "https://files.pythonhosted.org/packages/a7/60/be78c55a39b7bbc22ef347a3ca05f0664adbc1339fcd714170d9098b317a/cv_algorithms-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-13 02:04:29",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "cv-algorithms"
}