robotgo icon indicating copy to clipboard operation
robotgo copied to clipboard

FindBitmap wont work if image taken on a different screen resolution

Open yeknava opened this issue 6 years ago • 5 comments

  • Robotgo version (or commit ref): latest
  • Go version: 1.10
  • Gcc version: 7.3
  • Operating system and bit: ubuntu
  • Resolution: 1600, 900
  • Can you reproduce the bug at [Examples]:
    • [ ] Yes (provide example code)
    • [ ] No
    • [x] Not relevant

Description

FindBitmap wont work if image taken on a different screen resolution

yeknava avatar Oct 09 '18 13:10 yeknava

@vcaesar any solution you may have to this ? i may help to achieve it for v0.70. my current solution: get a resolution of the image was taken which will look for in findBitmap. then if resolution exists findBitmap can scale the picture to current screen size.

yeknava avatar Oct 10 '18 19:10 yeknava

I have not tested it on Ubuntu yet, please provide the test code.

If you have solved it, please provide the solution code and description, as well as the test code. Thanks.

vcaesar avatar Oct 10 '18 20:10 vcaesar

或许可以参照 Airtest 来提高准确性,它用了opencv的算法 https://cloud.tencent.com/developer/article/1381589

yangjuncode avatar May 27 '20 12:05 yangjuncode

@yangjuncode There is using opencv now, and some function is in the work.

vcaesar avatar Oct 12 '21 21:10 vcaesar

I added OpenCV find image function, please see the README.md. And I will test and enhancement the FindBitmap() function.

vcaesar avatar Oct 13 '21 19:10 vcaesar