IconMatch


NameIconMatch JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryPackage for detecting Icons from images or screen
upload_time2024-05-20 11:39:26
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2020 Luis Zugasti Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords icon iconmatch nativesensors scanning
VCS
bugtrack_url
requirements numpy opencv_python_headless Pillow pynput PySide2
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">
	IconMatch
</h1>

<p align="center">
	<i>Easily select icons on the screen in any environment.</i>
</p>

<p align="center">
  <a href="">
    <img src="https://raw.githubusercontent.com/luiszugasti/IconMatch/main/images/screenshot.png" alt="Showcasing bounding boxes and original image"/>
  </a>
  <a href="">
    <img src="https://raw.githubusercontent.com/luiszugasti/IconMatch/main/images/nearest_box.gif" alt="Showcasing candidate boxes functionality"/>
  </a>
  <a href="">
    <img src="https://github.com/NativeSensors/IconMatch/assets/40773550/ebc5aa2e-50b3-464a-a033-7c54b7615eeb" alt="Showcasing realtime demo"/>
  </a>
</p>


This is part of the Hands Free Computing project. Built with [OpenCV 3.12](https://opencv.org) and [Python 3.8](https://python.org).

### 💜 Sponsors: 

```
Sponsor us and we can add your link, banner or other promo materials!
```
<!-- POLAR type=ads id=eizdelwu subscription_benefit_id=bb272b6d-f698-44e3-a417-36a6fa203bbe width=240 height=100 -->


<!-- POLAR-END id=eizdelwu -->

### 💜 Follow NativeSensors: 

<a href="https://polar.sh/NativeSensors"><picture><source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/embed/subscribe.svg?org=NativeSensors&label=Subscribe&darkmode"><img alt="Subscribe on Polar" src="https://polar.sh/embed/subscribe.svg?org=NativeSensors&label=Subscribe"></picture></a>

## Table of Contents


  - [Installation](#installation)
  - [Usage](#usage)
  - [API](#api)
  - [Roadmap](#roadmap)
  - [Contributing](#contributing)
  - [License](#license)
  - [Contact](#contact)


## Installation 

1. Install from PyPI:
```
$ pip install iconmatch
```

## Usage

You can use the functions as shown in [demo.py](https://github.com/luiszugasti/IconMatch/blob/main/icondetection/demo/demo.py) as a default entry point.

In the below example, the main set of functions is called within a callback function, as this allows the threshold value
to be controlled from a GUI in OpenCV.

Image Scanner:

```python
import cv2 as cv

import IconMatch.IconMatch from ImageScanner

src = cv.imread("source to your image file")
scanner = ImageScanner(thersh = 100)

detected_rectangles = scanner.scan(src)
# list of [(x,y,w,h),(x,y,w,h), ... , (x,y,w,h)]

```

Screen Scanner:

```python
import IconMatch.IconMatch from ScreenScanner

scanner = ScreenScanner(thersh = 100)

detected_rectangles = scanner.scan(bbox = (x,y,w,h))
# list of [(x,y,w,h),(x,y,w,h), ... , (x,y,w,h)]

```

RealTime demo:
```bash
python rt_demo.py
```

## Key Features

- Detection of areas with a high likelihood of being clickable icons.
- Detection of closest rectangle to point of interest (be it gaze, or mouse as in the examples)

## API

The current available APIs encompass what your image processing pipeline should contain. Both APIs are 
currently still experimental as I learn more about OpenCV and optimize code.

### ImageScanner
> Performs Canny detection on passed images and group overlapping rectangles 

### ScreenScanner
> Scans your display, take screnshoots and call ImageScanners

## Roadmap

- [x] Detect regions of interest with moderate accuracy
- [x] Detect candidate region based on proximity
- [x] Detect icon-like objects on the screen
- [?] Context provision into regions of interest


## Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **genuinely appreciated**.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

Distributed under the MIT License. See `LICENSE` for more information.

## Contact

Original Creator: Luis Zugasti - [@luis\_\_zugasti](https://twitter.com/luis__zugasti)
Original Creator blog: [https://luiszugasti.me](https://luiszugasti.me)

Current Maintainer: Piotr Walas - [@Piotr\_\_Walas](https://twitter.com/PW4ltz)

Project Link: [https://github.com/NativeSensors/IconMatch](https://github.com/NativeSensors/IconMatch)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "IconMatch",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Piotr Walas <piotr.walas@eyegestures.com>",
    "keywords": "Icon, IconMatch, NativeSensors, scanning",
    "author": null,
    "author_email": "Piotr Walas <piotr.walas@eyegestures.com>",
    "download_url": "https://files.pythonhosted.org/packages/df/d4/0fc96784490e602450544f74908c6f8085c403ab55741867677b207ee02d/iconmatch-0.2.0.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">\n\tIconMatch\n</h1>\n\n<p align=\"center\">\n\t<i>Easily select icons on the screen in any environment.</i>\n</p>\n\n<p align=\"center\">\n  <a href=\"\">\n    <img src=\"https://raw.githubusercontent.com/luiszugasti/IconMatch/main/images/screenshot.png\" alt=\"Showcasing bounding boxes and original image\"/>\n  </a>\n  <a href=\"\">\n    <img src=\"https://raw.githubusercontent.com/luiszugasti/IconMatch/main/images/nearest_box.gif\" alt=\"Showcasing candidate boxes functionality\"/>\n  </a>\n  <a href=\"\">\n    <img src=\"https://github.com/NativeSensors/IconMatch/assets/40773550/ebc5aa2e-50b3-464a-a033-7c54b7615eeb\" alt=\"Showcasing realtime demo\"/>\n  </a>\n</p>\n\n\nThis is part of the Hands Free Computing project. Built with [OpenCV 3.12](https://opencv.org) and [Python 3.8](https://python.org).\n\n### \ud83d\udc9c Sponsors: \n\n```\nSponsor us and we can add your link, banner or other promo materials!\n```\n<!-- POLAR type=ads id=eizdelwu subscription_benefit_id=bb272b6d-f698-44e3-a417-36a6fa203bbe width=240 height=100 -->\n\n\n<!-- POLAR-END id=eizdelwu -->\n\n### \ud83d\udc9c Follow NativeSensors: \n\n<a href=\"https://polar.sh/NativeSensors\"><picture><source media=\"(prefers-color-scheme: dark)\" srcset=\"https://polar.sh/embed/subscribe.svg?org=NativeSensors&label=Subscribe&darkmode\"><img alt=\"Subscribe on Polar\" src=\"https://polar.sh/embed/subscribe.svg?org=NativeSensors&label=Subscribe\"></picture></a>\n\n## Table of Contents\n\n\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [API](#api)\n  - [Roadmap](#roadmap)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Contact](#contact)\n\n\n## Installation \n\n1. Install from PyPI:\n```\n$ pip install iconmatch\n```\n\n## Usage\n\nYou can use the functions as shown in [demo.py](https://github.com/luiszugasti/IconMatch/blob/main/icondetection/demo/demo.py) as a default entry point.\n\nIn the below example, the main set of functions is called within a callback function, as this allows the threshold value\nto be controlled from a GUI in OpenCV.\n\nImage Scanner:\n\n```python\nimport cv2 as cv\n\nimport IconMatch.IconMatch from ImageScanner\n\nsrc = cv.imread(\"source to your image file\")\nscanner = ImageScanner(thersh = 100)\n\ndetected_rectangles = scanner.scan(src)\n# list of [(x,y,w,h),(x,y,w,h), ... , (x,y,w,h)]\n\n```\n\nScreen Scanner:\n\n```python\nimport IconMatch.IconMatch from ScreenScanner\n\nscanner = ScreenScanner(thersh = 100)\n\ndetected_rectangles = scanner.scan(bbox = (x,y,w,h))\n# list of [(x,y,w,h),(x,y,w,h), ... , (x,y,w,h)]\n\n```\n\nRealTime demo:\n```bash\npython rt_demo.py\n```\n\n## Key Features\n\n- Detection of areas with a high likelihood of being clickable icons.\n- Detection of closest rectangle to point of interest (be it gaze, or mouse as in the examples)\n\n## API\n\nThe current available APIs encompass what your image processing pipeline should contain. Both APIs are \ncurrently still experimental as I learn more about OpenCV and optimize code.\n\n### ImageScanner\n> Performs Canny detection on passed images and group overlapping rectangles \n\n### ScreenScanner\n> Scans your display, take screnshoots and call ImageScanners\n\n## Roadmap\n\n- [x] Detect regions of interest with moderate accuracy\n- [x] Detect candidate region based on proximity\n- [x] Detect icon-like objects on the screen\n- [?] Context provision into regions of interest\n\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **genuinely appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n## Contact\n\nOriginal Creator: Luis Zugasti - [@luis\\_\\_zugasti](https://twitter.com/luis__zugasti)\nOriginal Creator blog: [https://luiszugasti.me](https://luiszugasti.me)\n\nCurrent Maintainer: Piotr Walas - [@Piotr\\_\\_Walas](https://twitter.com/PW4ltz)\n\nProject Link: [https://github.com/NativeSensors/IconMatch](https://github.com/NativeSensors/IconMatch)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2020 Luis Zugasti  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Package for detecting Icons from images or screen",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/NativeSensors/IconMatch",
        "Issues": "https://github.com/NativeSensors/IconMatch/Issues"
    },
    "split_keywords": [
        "icon",
        " iconmatch",
        " nativesensors",
        " scanning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "51b9c42e2d4c1d950ec7d2cc28c563986510230180c5adc9c7f1706da5fa13c3",
                "md5": "d86c3aae17049cba37f3dd32b2caf02d",
                "sha256": "063e5577b60b5ed71c37bb536f16dc2671f3a55f5edcc5650a847283c5b564f4"
            },
            "downloads": -1,
            "filename": "iconmatch-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d86c3aae17049cba37f3dd32b2caf02d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 11900,
            "upload_time": "2024-05-20T11:39:24",
            "upload_time_iso_8601": "2024-05-20T11:39:24.825319Z",
            "url": "https://files.pythonhosted.org/packages/51/b9/c42e2d4c1d950ec7d2cc28c563986510230180c5adc9c7f1706da5fa13c3/iconmatch-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dfd40fc96784490e602450544f74908c6f8085c403ab55741867677b207ee02d",
                "md5": "f288cb173bb148d8312128d8f855c60e",
                "sha256": "c3c7f06ce272e84d0e913c14ff551592063912cf96671d18b6bf40e697fff3b3"
            },
            "downloads": -1,
            "filename": "iconmatch-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f288cb173bb148d8312128d8f855c60e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11357,
            "upload_time": "2024-05-20T11:39:26",
            "upload_time_iso_8601": "2024-05-20T11:39:26.486969Z",
            "url": "https://files.pythonhosted.org/packages/df/d4/0fc96784490e602450544f74908c6f8085c403ab55741867677b207ee02d/iconmatch-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-20 11:39:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NativeSensors",
    "github_project": "IconMatch",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.26.4"
                ]
            ]
        },
        {
            "name": "opencv_python_headless",
            "specs": [
                [
                    "==",
                    "4.8.1.78"
                ]
            ]
        },
        {
            "name": "Pillow",
            "specs": [
                [
                    "==",
                    "10.0.0"
                ]
            ]
        },
        {
            "name": "pynput",
            "specs": [
                [
                    "==",
                    "1.7.6"
                ]
            ]
        },
        {
            "name": "PySide2",
            "specs": [
                [
                    "==",
                    "5.15.2.1"
                ]
            ]
        }
    ],
    "lcname": "iconmatch"
}
        
Elapsed time: 0.25472s