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

Conversation

simonmeggle
Copy link

Hi,
with this pull request I want to share the work of my valued colleague @gautamilango and me.

It introduces another strategy edgeto detect images in situations when too much pixels are different and further loweringconfidence would lead to false (or no) results.

The key here is to pre-process both images (reference image and screenshot) with canny edge detection (https://scikit-image.org/).

This reduces the images to the most relevant parts before they are compared.

It makes image detection extremely rebust against

  • inpredictable colour nuances (example: "hover"-colors for buttons)
  • compression artifacts (e.g. when testing over RDP/Citrix, which compress screen information depending on the available bandwidth)
  • pixel deviations of dynamic image sources (e.g. map from 3rd party providers)
  • ...

Debug Image is a helper keyword and starts a UI (written by Gautam) which gives worthful insights about

  • the best strategy (default oder edge),
  • its parameters (confidence, egde detection params),
  • the number of matches (unknown so far)
  • the match score of the best match (also unknown, done with try&error).

image

There is also a detailled debugger. It shows the edge detection results in oder to fine-tune the parameters.

image

We are already using the edge strategy successfully in production (synthetic e2e monitoring with Checkmk/Robotmk) and it works pretty well.

To make this strategy as integrated as possible, we have put a lot of effort into this, without breaking any existing functionality.

Thanks to ABRAXAS Informatik AG in Switzerland, which spent the ressources to make this possible at all! 👍

That's all for now - we are looking forward to hearing from you.
Any suggestion is highly appreciated! :-)

Best regards,
Simon
(simon.meggle at elabit.de)

PS: See also https://blog.robotmk.org/

@Tattoo
Copy link
Contributor

Tattoo commented Feb 25, 2022

Hi @simonmeggle,

This on the first glance seems an awesome addtition to the library!

I need to check this thoroughly which I haven't had time yet. I hope to check this in the coming weeks.

@simonmeggle
Copy link
Author

Hi Tattoo, glad to hear that you find this useful.
I understand that this is a big commit which needs to be carefully reviewed.
Take your time, I can provide you any assistance you need!

@simonmeggle
Copy link
Author

Hi Tattoo, I just want to ask if I can be of any help? Regards, Simon

@kleinski
Copy link

It would be awesome to have the edge strategy included in the imagehorzizonlibrary to avoid the problems of compression artifacts while trying to test through RDP environments.

@PhilippLemke
Copy link

I I am already looking for such a feature, as I often struggle with (nested) remote desktop connections.

@a9038889
Copy link

This function is very good~ I look forward to its appearance

@maxiking203
Copy link

I also took a look at @simonmeggle new features to the Library. We could really improve our testcases and developing process with the implemented debugger and the edge detection.
Definitely looking forward to use them as a Component of the ImageHorizonLibrary in the future.

@roland-gsell
Copy link

This would be very useful in our environment. Hope it gets implemented soon.

@7meis
Copy link

7meis commented Jan 5, 2023

Happy new year!
Is there already a timeline to implement this.
This function would be very helpful for my use cases.
Many thanks.

@simonmeggle
Copy link
Author

simonmeggle commented Jan 6, 2023

Is there already a timeline to implement this.

It will be implemented soon, but obviously not in this library (the pr still hangs, no one has ever reviewed it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants