Skip to content

Detect icons on the screen easily and quickly.

License

Notifications You must be signed in to change notification settings

NativeSensors/IconMatch

 
 

Repository files navigation

IconMatch

Easily select icons on the screen in any environment.

Showcasing bounding boxes and original image Showcasing candidate boxes functionality Showcasing realtime demo

This is part of the Hands Free Computing project. Built with OpenCV 3.12 and Python 3.8.

💜 Sponsors:

Sponsor us and we can add your link, banner or other promo materials!

💜 Follow NativeSensors:

Subscribe on Polar

Table of Contents

Installation

  1. Install from PyPI:
$ pip install iconmatch

Usage

You can use the functions as shown in 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:

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:

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:

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

  • Detect regions of interest with moderate accuracy
  • Detect candidate region based on proximity
  • 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 Original Creator blog: https://luiszugasti.me

Current Maintainer: Piotr Walas - @Piotr__Walas

Project Link: https://github.com/NativeSensors/IconMatch

About

Detect icons on the screen easily and quickly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%