使用Python脚本在windows屏幕找图

这篇博客介绍了如何利用Python脚本在Windows操作系统中进行屏幕找图,并提到了一个用Flutter开发的应用程序,该应用可能需要源码。此外,还提及了文字转换工具、娱乐应用和最佳笔记软件。

Python实现windows屏幕找图

import win32gui
hwnd_title = dict()
def get_all_hwnd(hwnd,mouse):
  if win32gui.IsWindow(hwnd) and win32gui.IsWindowEnabled(hwnd) and win32gui.IsWindowVisible(hwnd):
    hwnd_title.update({hwnd:win32gui.GetWindowText(hwnd)})


from PyQt5.QtWidgets import QApplication
from PyQt5.QtGui import *
import win32gui
import sys

import time
import win32gui, win32ui, win32con, win32api
from send_text import send_message_to_slack
import random
import pyscreenshot as ImageGrab
import sys
import numpy as np
import time
from cv2 import cv2 
from time import sleep

def get_pay_keyboard_number_location(impath, target,fit_num): #fit_num是匹配度,如 0.95,0.85

        print("start find pic")
        positions = {}

        start = time.time()
        img_rgb = cv2.imread(impath)

        teNum = "done"

        template = cv2.imread(target)
        h, w = template.shape[:-1]

        res = cv2.matchTemplate(img_rgb, template, cv2.TM_CCOEFF_NORMED)

        threshold = fi
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值