2024年1月30日

利用pyautogui调用微信ocr

摘要: import pyautogui import time def ocrweixin(filename): # 鼠标点击,默认左键 #移至sheet页 pyautogui.click(1386,33) #点击 地址框 pyautogui.click(1364,94) pyautogui.hotkey 阅读全文

posted @ 2024-01-30 18:03 耀扬 阅读(47) 评论(0) 推荐(0) 编辑

Python调用微信OCR识别文字和坐标

摘要: python的ocr识别最方便的最准确的方法就是直接调微信的ocr 注意:调用的时候 先把微信关掉。 import os import json import time from wechat_ocr.ocr_manager import OcrManager, OCR_MAX_TASK_ID we 阅读全文

posted @ 2024-01-30 12:25 耀扬 阅读(475) 评论(0) 推荐(0) 编辑

图片剪裁

摘要: from PIL import Image def crop_image(path, cropped_path): image = Image.open(path) cropped = image.crop((560, 460, 4040, 6100)) cropped.save(cropped_p 阅读全文

posted @ 2024-01-30 11:16 耀扬 阅读(2) 评论(0) 推荐(0) 编辑

pdf转图片

摘要: pip install PyMuPDF import fitz def pdf_image(pdfPath, imgPath, zoom_x, zoom_y, rotation_angle): # 打开PDF文件 pdf = fitz.open(pdfPath) # 逐页读取PDF for pg i 阅读全文

posted @ 2024-01-30 11:16 耀扬 阅读(1) 评论(0) 推荐(0) 编辑

将原pdf 拆解成独立的pdf

摘要: from PyPDF2 import PdfReader, PdfWriter file_reader = PdfReader("fsyy-en-cn.pdf") # getNumPages() 获取总页数 for page in range(len(file_reader.pages)): # 实 阅读全文

posted @ 2024-01-30 11:15 耀扬 阅读(4) 评论(0) 推荐(0) 编辑

导航