From 760290dfc0a0b8d10975c29286a3f7596119d3b1 Mon Sep 17 00:00:00 2001 From: JJMdzh Date: Mon, 14 Apr 2025 22:11:58 +0800 Subject: [PATCH] Update main.js (#573) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复边缘点击问题 --- repo/js/OCR购买食材/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo/js/OCR购买食材/main.js b/repo/js/OCR购买食材/main.js index 7f08db07..c32afbfb 100644 --- a/repo/js/OCR购买食材/main.js +++ b/repo/js/OCR购买食材/main.js @@ -191,7 +191,7 @@ async function recognizeIngredient(ingredient) { const clickOffset = 30; // 点击坐标偏移 // 尝试 OCR 识别 - let ocrResult = await performOcr(ingredient, { min: 210, max: 390 }, { min: 105, max: 950 }, 10); + let ocrResult = await performOcr(ingredient, { min: 210, max: 390 }, { min: 105, max: 920 }, 10); if (ocrResult.success) { log.info(`通过 OCR 识别找到食材: ${ingredient}`); log.info(`坐标: x=${ocrResult.x}, y=${ocrResult.y}`);