HOME 개발팁 이미지 비교

프로그램 작업하다 좋은 팁, 정보, 테스트를 기록하는 곳입니다.


python | 이미지 비교

페이지 정보

작성자 굿스웹 작성일19-08-29 16:28 조회896회 댓글0건

본문

import pyautogui

import schedule

import sched, time

import numpy

import pytesseract

from PIL import Image, ImageEnhance, ImageFilter, ImageGrab


import re

import cv2

import configparser

import os

from PIL import Image

from pytesseract import *

from PIL import Image     

from pytesseract import * 



def txtsh():

text = 0

image  = Image.open('yy5.jpg')

print( pytesseract.image_to_string(image))



def sh(a,b):

backWidth, backHeight = pyautogui.size()

mousePositionX, mousePositionY = pyautogui.position()


imgGrab = ImageGrab.grab(bbox=(float(a - 30), float(b - 20), a + 30, b + 20))

cv_img = cv2.cvtColor(numpy.array(imgGrab), cv2.COLOR_RGB2BGR)



cv2.imshow('image',cv_img)

cv2.imread('--------------.jpg', cv2.IMREAD_COLOR)

imgGrab.save("--------------.jpg")

#cv2 .waitKey(0)

cv2.destroyAllWindows()

exit()

   


def sleeper():

    

while True:

try:

five_btn = pyautogui.locateOnScreen('8.png',grayscale=False)

center = pyautogui.center(five_btn)

#print(center.x + 'x' + center.x)

print(center)


#pyautogui .moveTo(center.x,center.y, duration=2, tween=pyautogui.easeInOutQuad )


if five_btn != None:

print('찾았어요')

sh(center.x,center.y)

break


except KeyboardInterrupt:

exit()

except:

    print('검색중')

    time.sleep(5)


#time .sleep(4.01)


try:

    sleeper()

    #txtsh ()

except KeyboardInterrupt:

    print('\n\nKeyboard exception received. Exiting.')

    exit()




#pip #install pillow

pip install pytesseract

pyautogui.PAUSE = 2.5

pyautogui.moveTo(200, 200)

pyautogui.click()

pyautogui.hotkey('ctrl', 's')

print(five_btn)

print(center)

pyautogui.click(center)

backWidth, backHeight = pyautogui.size()

mousePositionX, mousePositionY = pyautogui.position()

python -m pip install opencv_python

pip install tox


[주소복사] https://www.goodsweb.kr/?u=D41SSH54
SNS 알리기
핀터레스트
텔레그램로
블로그로
카카오스토리
카톡 공유

관련 블로그
로딩중


2명  IP : 3.17.♡.89
001 141.♡.61.111 오류안내 페이지
(/bbs/login_check.php)
002 3.♡.185.170 굿스웹 공식 로고 안내 - 공지사항
(/bbs/board.php?bo_table=note&wr_id=3)

접속자
  • 오늘 : 139
  • 어제 : 381
  • 최대 : 874
  • 전체 : 400,845

검색로봇(Robots) 최근 방문시간
  • GOOGLE : 1시간 전
  • NAVER : 1일 전
  • DAUM : 1일 전
  • BING : 3일 전

ETH : 0x8abf3B748ab78828AE07685e4fd53d1a606f18D3



페이스북 네이버 블로그 굿스웹 쇼핑몰 네이버 카페 굿스웹 트위터 굿스웹 티스토리 Google Play