Image recognition/icone/figure on own python computer screen

Asked

Viewed 1,698 times

-1

I’m starting a study on image recognition, I got to work with Opencv I did some basic tests of face recognition and some objects that already come in the library, I would like to capture the screen instead of a webcam to locate something on the screen, as an icon or some other element. Taking advantage of the post, it would be possible to read a number or word in a certain area,

  • Do you know Sikuli? He does what you want, https://sikulix-2014.readthedocs.io/en/latest/index.html

1 answer

0

I’m also new in this area and I don’t know if you have a command for Screenshots in the Opencv library, but there is the pyscreenshot library.

You must install it:

pip install pyscreenshot - Windows
sudo pip instalar pyscreenshot - Linux

To use the screenshot.

import pyscreenshot as pys

imagem = pys.grab() #Para tirar o Screenshots
imagem.show() # mostrar a imagem
imagem.save('test.jpg', 'jpeg') #Salva a imagem na pasta do arquivo e será.jpeg

And just increment with the cv2 library

img = cv2.imread('test.jpeg',1)
cv2.imshow('captura de tela', img)

I don’t know how to read a number or word in cv2, but I think you can. I will study on. I hope I have helped.

More about pyscreenshot https://pypi.org/project/pyscreenshot/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.