Image / icone / figure recognition on the computer screen itself in python

-1

I'm starting to study image recognition, I've even messed with OpenCV I've done some basic face recognition tests and some objects that already come in the library, I'd 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,

    
asked by anonymous 17.08.2018 / 18:37

1 answer

0

I am also new to this area and I do not know if it has a command for Screenshots in the Opencv library, but there is the pyscreenshot library.

1st 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 do not know how to read a number or word in cv2, but I think you can. I'll study on. I hope I have helped.

More about pyscreenshot link

    
18.08.2018 / 05:37