Token导航 LogoToken导航TokenDH.com
研究检索权限需确认clawhub未标认证来源可访问clear审计通过

screen-icon-finder屏幕图标查找器

Agent Skill

screen-icon-finder 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,696

周安装

108

GitHub Stars

公开资料未说明

下载量

873
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:screen-icon-finder(屏幕图标查找器)
来源仓库:https://github.com/lieyingthh/screen-icon-finder
安装命令:
openclaw skills install screen-icon-finder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install screen-icon-finder

简介

在屏幕截图或图片中,通过 OpenCV 模板匹配查找指定图标/图片的位置,支持多尺度匹配去重。 用于:(1) 用户发来一个小图,让你在屏幕上找;(2) 查找所有匹配图标并标号;(3) 点击找到的图标。 关键词:找图标、定位图标、模板匹配、找按钮、点击图标、图片搜索。

SKILL.md

name
screen-icon-finder
description
|

Screen Icon Finder

通过 OpenCV 模板匹配,在屏幕截图或任意图片中精确查找目标图标位置。

核心脚本

find_icon.py — 查找 + 标记

import cv2
import numpy as np
import sys

def find_icon(small_path, big_path=None, threshold=0.75, scale_min=0.3, scale_max=2.0, scale_steps=35):
    """
    在大图中查找小图,支持多尺度匹配和 NMS 去重。
    
    small_path: 小图路径(要找的目标图标,用户发来的图片)
    big_path: 大图路径(屏幕截图),默认截取全屏
    threshold: 匹配阈值,默认 0.75
    返回: [(x, y, score, center_x, center_y, scale, w, h), ...]
    """
    import pyautogui
    
    if big_path is None:
        img = pyautogui.screenshot()
        img.save('_temp_screen.png')
        big_path = '_temp_screen.png'
    
    small = cv2.imread(small_path)
    big = cv2.imread(big_path)
    
    gray_big = cv2.cvtColor(big, cv2.COLOR_BGR2GRAY)
    gray_small = cv2.cvtColor(small, cv2.COLOR_BGR2GRAY)
    
    # 找最佳缩放
    best_score = 0
    best_scale = 1
    best_size = None
    
    for scale in np.linspace(scale_min, scale_max, scale_steps):
        w = int(small.shape[1] * scale)
        h = int(small.shape[0] * scale)
        if w > big.shape[1] or h > big.shape[0] or w < 5 or h < 5:
            continue
        resized = cv2.resize(gray_small, (w, h))
        result = cv2.matchTemplate(gray_big, resized, cv2.TM_CCOEFF_NORMED)
        _, max_val, _, _ = cv2.minMaxLoc(result)
        if max_val > best_score:
            best_score = max_val
            best_scale = scale
            best_size = (w, h)
    
    # 找所有匹配
    resized = cv2.resize(gray_small, best_size)
    result = cv2.matchTemplate(gray_big, resized, cv2.TM_CCOEFF_NORMED)
    locations = np.where(result >= threshold)
    matches = list(zip(*locations[::-1]))
    
    # NMS 去重
    scored = [(x, y, result[y, x]) for x, y in matches]
    scored.sort(key=lambda t: t[2], reverse=True)
    
    filtered = []
    min_dist = max(best_size) * 0.5
    
    for x, y, s in scored:
        too_close = False
        for fx, fy, _ in filtered:
            if abs(x - fx) < min_dist and abs(y - fy) < min_dist:
                too_close = True
                break
        if not too_close:
            filtered.append((x, y, s))
    
    return [(x, y, s, x+best_size[0]//2, y+best_size[1]//2, best_scale, best_size[0], best_size[1]) 
            for x, y, s in filtered]


def mark_icons(matches, big_path, output_path, color=(0, 255, 0)):
    """在大图上标记所有匹配位置,带序号"""
    img = cv2.imread(big_path)
    font = cv2.FONT_HERSHEY_SIMPLEX
    
    for i, (x, y, score, cx, cy, scale, w, h) in enumerate(matches):
        cv2.rectangle(img, (x, y), (x+w, y+h), color, 3)
        cv2.putText(img, f'{i+1}', (x + w//2 - 10, y - 10), font, 1.5, (0, 0, 255), 3)
        cv2.putText(img, f'{score:.2f}', (x + w//2 - 20, y + h + 25), font, 0.6, color, 1)
    
    cv2.imwrite(output_path, img)


if __name__ == '__main__':
    if len(sys.argv) < 2:
        print('用法: python find_icon.py <小图路径> [大图路径]')
        sys.exit(1)
    
    small = sys.argv[1]
    big = sys.argv[2] if len(sys.argv) > 2 else None
    
    results = find_icon(small, big)
    
    print(f'找到 {len(results)} 个匹配:')
    for i, r in enumerate(results):
        print(f'  #{i+1}: 位置({r[0]}, {r[1]}), 中心({r[3]}, {r[4]}), 缩放={r[5]:.2f}, 匹配度={r[2]:.4f}')
    
    if results:
        # 默认标记第一个
        big_path = '_temp_screen.png' if big is None else big
        mark_icons(results, big_path, '_result.png')
        print(f'已保存标记图: _result.png')

使用方式

1. 用户发图查找

用户发来一个小图(图标截图),在全屏截图中查找:

用户:找到这个图标,在屏幕上标记出来
AI:调用 find_icon.py,传入小图路径,标记结果发回

2. 标记多个匹配

传入阈值,默认 0.75。匹配度高(>0.9)说明是目标图标,低的话可能是相似图。

3. 点击图标

找到后用 pyautogui.click(cx, cy) 点击中心坐标。

注意

  • 微信截图和屏幕截图分辨率可能不同,多尺度匹配是关键
  • 缩放范围 0.3~2.0,步长 35,可覆盖大多数场景
  • NMS 去重避免重复标记同一图标

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

87.23%
按下载量换算762

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills