0

When using pyautogui.locateAllOnScreen() to look for images on screen (2x2 black pixels), the function returns coordinates of every single 2x2 matching pixels on screen, completely ignoring their color.

Same thing happens with locateOnScreen(), it returns the top-left corner of the region.

Setting grayscale or confidence to various values did not help, any advice?

ragequit
  • 3
  • 5
  • No, it's not about color. It just can't match ANY single-colored images. PyAutoGui use PyScreeze to match image, and PyScreeze depends on CV2. Spent 5 hours figuring out what is wrong with CV2, it's just not possible. Image you're looking for must have slightest difference, not monotone. – jupiterbjy Jul 04 '20 at 01:07
  • Refer this results: [1](https://github.com/jupiterbjy/StackOverFlow/blob/master/_62720079/result.png) [2](https://github.com/jupiterbjy/StackOverFlow/blob/master/_62720079/matched.png). This is visualized result of match, and as you see it just match first pixel regardless of given [target](https://github.com/jupiterbjy/StackOverFlow/blob/master/_62720079/sample.png) image. – jupiterbjy Jul 04 '20 at 01:15

0 Answers0