Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: image detection strategy "edge" #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Install python test dependencies
run: |
python --version
python -m pip install mock robotframework opencv-python eel .
python -m pip install mock robotframework opencv-python scikit-image eel .

- name: Run tests
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ log.html
/bin
/include
/lib
*egg-info
test_*
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8.7
41 changes: 41 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Aktuelle Datei",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/src/ImageHorizonLibrary",
"justMyCode": false
},
{
"name": "libdoc",
"type": "python",
"request": "launch",
"module": "robot.libdoc",
"args": [
"-P",
"src",
"ImageHorizonLibrary",
"doc\\ImageHorizonLibrary.html"
],
"console": "integratedTerminal",
"justMyCode": false
},
{
"type": "robotframework-lsp",
"name": "Robot Framework: Launch .robot file",
"request": "launch",
"cwd": "${workspaceFolder}",
"target": "${file}",
"terminal": "integrated",
"env": {},
"args": []
}
]
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"python.testing.unittestArgs": [
"-v",
"-s",
"./tests/utest",
"-p",
"test_*.py"
],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": true
}
13 changes: 8 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ ImageHorizonLibrary
===================

This Robot Framework library provides the facilities to automate GUIs based on
image recognition similar to Sikuli. This library wraps pyautogui_ to achieve
this.
image recognition similar to Sikuli, but without any Java dependeny (100% Python).

For non pixel perfect matches, there is a feature called `confidence level`
that comes with a dependency OpenCV (python package: `opencv-python`).
There are two different recognition strategies: *default* (using pyautogui_) and *edge* (using skimage_).

For non pixel perfect matches, there is a feature called "confidence level" that
allows to define the percentage of pixels which *must* match.

In the *default* strategy, confidence comes with a dependency to OpenCV (python package: `opencv-python`).
This functionality is optional - you are not required to
install `opencv-python` package if you do not use confidence level.

Expand Down Expand Up @@ -35,7 +38,6 @@ Prerequisites

- `Python 3.x`
- pip_ for easy installation
- pyautogui_ and `it's prerequisites`_
- `Robot Framework`_

On Ubuntu, you need to take `special measures`_ to make the screenshot
Expand Down Expand Up @@ -149,6 +151,7 @@ To regenerate documentation (`doc/ImageHorizonLibrary.html`), use this command:
.. _Python 3.x: http://python.org
.. _pip: https://pypi.python.org/pypi/pip
.. _pyautogui: https://github.com/asweigart/pyautogui
.. _skimage: https://scikit-image.org/docs/dev/auto_examples/features_detection/plot_template.html
.. _it's prerequisites: https://pyautogui.readthedocs.org/en/latest/install.html
.. _Robot Framework: http://robotframework.org
.. _double all coordinates: https://github.com/asweigart/pyautogui/issues/33
Expand Down
8 changes: 8 additions & 0 deletions _requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
robotframework
mock
pyautogui
tk
opencv-python
scikit-image
# pyqt5 is only needed to use skimage.viewer.ImageViewer(refImage) while debugging
# pyqt5
Loading