polyfiller-g4


Namepolyfiller-g4 JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/Genzo4/polyfiller
SummaryPolygon Filler
upload_time2023-10-06 02:10:09
maintainer
docs_urlNone
authorGenzo
requires_python>=3.6
licenseMIT
keywords polyfiller poly filler polygon filler opencv opencv-contrib-python g4
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Language](https://img.shields.io/badge/English-brigthgreen)

# PolyFiller

![PyPI](https://img.shields.io/pypi/v/polyfiller-g4)
![PyPI - License](https://img.shields.io/pypi/l/polyfiller-g4)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/polyfiller-g4)

Python module for polygon filling on images.

***

## Installation

### Package Installation from PyPi

```bash
$ pip install polyfiller-g4
```

### Package Installation from Source Code

The source code is available on [GitHub](https://github.com/Genzo4/polyfiller).  
Download and install the package:

```bash
$ git clone https://github.com/Genzo4/polyfiller
$ cd polyfiller
$ pip install -r requirements.txt
$ pip install .
```

***

## Basic usage

- ### Import:
```python
from polyfiller_g4 import PolyFiller
```

- ### Create instance:
Create an instance of the PolyFiller. You can specify additional options:
- ext - extension to add to the output file.
  Default value: fill.
- color - filling color.
  Default value: 0 (black).

```python
pf = PolyFiller(ext='add_ext', color=(255, 0, 0))
```

- ### Add filling polygons (0 or many)
```python
pf.addPolygon([[0, 0], [1919, 0], [1919, 682], [1277, 385], [951, 374], [0, 615]])
pf.addPolygon([[100, 100], [200, 100], [150, 150]])
```

- ### Filling frame
```python
pf.fill('frame_1.png')
pf.fill('frame_2.png')
...
pf.fill('frame_n.png')
```
Output files are created with the extension added.

![Input frame](https://github.com/Genzo4/polyfiller/raw/main/images/frame_1.png "Input frame")
![Output frame](https://github.com/Genzo4/polyfiller/raw/main/images/frame_1.fill.png "Output frame")

See the example.py file for an example of usage.

[Changelog](https://github.com/Genzo4/polyfiller/blob/main/CHANGELOG.md)
***

![Language](https://img.shields.io/badge/Русский-brigthgreen)

# PolyFiller

![PyPI](https://img.shields.io/pypi/v/polyfiller-g4)
![PyPI - License](https://img.shields.io/pypi/l/polyfiller-g4)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/polyfiller-g4)

Python модуль для заливки многоугольника\ов на изображении однотонным цветом. 

***

## Установка

### Установка пакета с PyPi

```bash
$ pip install polyfiller-g4
```

### Установка пакета из исходного кода

Исходный код размещается на [GitHub](https://github.com/Genzo4/polyfiller).  
Скачайте его и установите пакет:

```bash
$ git clone https://github.com/Genzo4/polyfiller
$ cd polyfiller
$ pip install -r requirements.txt
$ pip install .
```

***

## Использование

- ### Подключаем:
```python
from polyfiller_g4 import PolyFiller
```

- ### Создаём экземпляр
Создаём экземпляр PolyFiller. Можно указать дополнительные параметры:
- ext - расширение, добавляемое к выходному файлу.
  Значение по умолчанию: fill.
- color - цвет заливки.
  Значение по умолчанию: 0 (чёрный цвет).

```python
pf = PolyFiller(ext='add_ext', color=(255, 0, 0))
```

- ### Добавляем полигоны для заливки (0 или много)
```python
pf.addPolygon([[0, 0], [1919, 0], [1919, 682], [1277, 385], [951, 374], [0, 615]])
pf.addPolygon([[100, 100], [200, 100], [150, 150]])
```

- ### Заливка изображений
```python
pf.fill('frame_1.png')
pf.fill('frame_2.png')
...
pf.fill('frame_n.png')
```
Создаются выходные файлы с добавленным расширением.

![Input frame](https://github.com/Genzo4/polyfiller/raw/main/images/frame_1.png "Input frame")
![Output frame](https://github.com/Genzo4/polyfiller/raw/main/images/frame_1.fill.png "Output frame")

Пример использования см. в файле example.py

[Changelog](https://github.com/Genzo4/polyfiller/blob/main/CHANGELOG.md)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Genzo4/polyfiller",
    "name": "polyfiller-g4",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "polyfiller,poly filler,polygon filler,opencv,opencv-contrib-python,g4",
    "author": "Genzo",
    "author_email": "genzo@bk.ru",
    "download_url": "https://files.pythonhosted.org/packages/b5/45/403d6dde7747a9524d88b7f18874787c651d96d6ff946c9e14e94b3f7912/polyfiller_g4-1.2.0.tar.gz",
    "platform": null,
    "description": "![Language](https://img.shields.io/badge/English-brigthgreen)\r\n\r\n# PolyFiller\r\n\r\n![PyPI](https://img.shields.io/pypi/v/polyfiller-g4)\r\n![PyPI - License](https://img.shields.io/pypi/l/polyfiller-g4)\r\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/polyfiller-g4)\r\n\r\nPython module for polygon filling on images.\r\n\r\n***\r\n\r\n## Installation\r\n\r\n### Package Installation from PyPi\r\n\r\n```bash\r\n$ pip install polyfiller-g4\r\n```\r\n\r\n### Package Installation from Source Code\r\n\r\nThe source code is available on [GitHub](https://github.com/Genzo4/polyfiller).  \r\nDownload and install the package:\r\n\r\n```bash\r\n$ git clone https://github.com/Genzo4/polyfiller\r\n$ cd polyfiller\r\n$ pip install -r requirements.txt\r\n$ pip install .\r\n```\r\n\r\n***\r\n\r\n## Basic usage\r\n\r\n- ### Import:\r\n```python\r\nfrom polyfiller_g4 import PolyFiller\r\n```\r\n\r\n- ### Create instance:\r\nCreate an instance of the PolyFiller. You can specify additional options:\r\n- ext - extension to add to the output file.\r\n  Default value: fill.\r\n- color - filling color.\r\n  Default value: 0 (black).\r\n\r\n```python\r\npf = PolyFiller(ext='add_ext', color=(255, 0, 0))\r\n```\r\n\r\n- ### Add filling polygons (0 or many)\r\n```python\r\npf.addPolygon([[0, 0], [1919, 0], [1919, 682], [1277, 385], [951, 374], [0, 615]])\r\npf.addPolygon([[100, 100], [200, 100], [150, 150]])\r\n```\r\n\r\n- ### Filling frame\r\n```python\r\npf.fill('frame_1.png')\r\npf.fill('frame_2.png')\r\n...\r\npf.fill('frame_n.png')\r\n```\r\nOutput files are created with the extension added.\r\n\r\n![Input frame](https://github.com/Genzo4/polyfiller/raw/main/images/frame_1.png \"Input frame\")\r\n![Output frame](https://github.com/Genzo4/polyfiller/raw/main/images/frame_1.fill.png \"Output frame\")\r\n\r\nSee the example.py file for an example of usage.\r\n\r\n[Changelog](https://github.com/Genzo4/polyfiller/blob/main/CHANGELOG.md)\r\n***\r\n\r\n![Language](https://img.shields.io/badge/\u0420\u0443\u0441\u0441\u043a\u0438\u0439-brigthgreen)\r\n\r\n# PolyFiller\r\n\r\n![PyPI](https://img.shields.io/pypi/v/polyfiller-g4)\r\n![PyPI - License](https://img.shields.io/pypi/l/polyfiller-g4)\r\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/polyfiller-g4)\r\n\r\nPython \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0437\u0430\u043b\u0438\u0432\u043a\u0438 \u043c\u043d\u043e\u0433\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430\\\u043e\u0432 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0442\u043e\u043d\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c. \r\n\r\n***\r\n\r\n## \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\r\n\r\n### \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441 PyPi\r\n\r\n```bash\r\n$ pip install polyfiller-g4\r\n```\r\n\r\n### \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430\r\n\r\n\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430 [GitHub](https://github.com/Genzo4/polyfiller).  \r\n\u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442:\r\n\r\n```bash\r\n$ git clone https://github.com/Genzo4/polyfiller\r\n$ cd polyfiller\r\n$ pip install -r requirements.txt\r\n$ pip install .\r\n```\r\n\r\n***\r\n\r\n## \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\r\n\r\n- ### \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c:\r\n```python\r\nfrom polyfiller_g4 import PolyFiller\r\n```\r\n\r\n- ### \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\r\n\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 PolyFiller. \u041c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:\r\n- ext - \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0435 \u043a \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443.\r\n  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: fill.\r\n- color - \u0446\u0432\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u043a\u0438.\r\n  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: 0 (\u0447\u0451\u0440\u043d\u044b\u0439 \u0446\u0432\u0435\u0442).\r\n\r\n```python\r\npf = PolyFiller(ext='add_ext', color=(255, 0, 0))\r\n```\r\n\r\n- ### \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u044b \u0434\u043b\u044f \u0437\u0430\u043b\u0438\u0432\u043a\u0438 (0 \u0438\u043b\u0438 \u043c\u043d\u043e\u0433\u043e)\r\n```python\r\npf.addPolygon([[0, 0], [1919, 0], [1919, 682], [1277, 385], [951, 374], [0, 615]])\r\npf.addPolygon([[100, 100], [200, 100], [150, 150]])\r\n```\r\n\r\n- ### \u0417\u0430\u043b\u0438\u0432\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439\r\n```python\r\npf.fill('frame_1.png')\r\npf.fill('frame_2.png')\r\n...\r\npf.fill('frame_n.png')\r\n```\r\n\u0421\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c.\r\n\r\n![Input frame](https://github.com/Genzo4/polyfiller/raw/main/images/frame_1.png \"Input frame\")\r\n![Output frame](https://github.com/Genzo4/polyfiller/raw/main/images/frame_1.fill.png \"Output frame\")\r\n\r\n\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043c. \u0432 \u0444\u0430\u0439\u043b\u0435 example.py\r\n\r\n[Changelog](https://github.com/Genzo4/polyfiller/blob/main/CHANGELOG.md)\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Polygon Filler",
    "version": "1.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/Genzo4/polyfiller/issues",
        "Homepage": "https://github.com/Genzo4/polyfiller"
    },
    "split_keywords": [
        "polyfiller",
        "poly filler",
        "polygon filler",
        "opencv",
        "opencv-contrib-python",
        "g4"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb14e10144db88a96940fe35f93bd13aa3fcf874d05f479ab2ea99b12ee6e325",
                "md5": "ce505ce86876581ada15406b40611d25",
                "sha256": "cc5122a79f8e8e5c9feb238992be556e44b89c2e6cc6cbf979cf563a5b4f7014"
            },
            "downloads": -1,
            "filename": "polyfiller_g4-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce505ce86876581ada15406b40611d25",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5220,
            "upload_time": "2023-10-06T02:10:05",
            "upload_time_iso_8601": "2023-10-06T02:10:05.541048Z",
            "url": "https://files.pythonhosted.org/packages/cb/14/e10144db88a96940fe35f93bd13aa3fcf874d05f479ab2ea99b12ee6e325/polyfiller_g4-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b545403d6dde7747a9524d88b7f18874787c651d96d6ff946c9e14e94b3f7912",
                "md5": "f4d044bc1e95dab55a54f2675fa55f09",
                "sha256": "b48d42c5b6e7bbe838e6aaa777234e396a84e3f2deb0eb48880593b84807156c"
            },
            "downloads": -1,
            "filename": "polyfiller_g4-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f4d044bc1e95dab55a54f2675fa55f09",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 6243,
            "upload_time": "2023-10-06T02:10:09",
            "upload_time_iso_8601": "2023-10-06T02:10:09.641673Z",
            "url": "https://files.pythonhosted.org/packages/b5/45/403d6dde7747a9524d88b7f18874787c651d96d6ff946c9e14e94b3f7912/polyfiller_g4-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-06 02:10:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Genzo4",
    "github_project": "polyfiller",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "polyfiller-g4"
}
        
Elapsed time: 1.69958s