Token导航 LogoToken导航TokenDH.com
图像处理权限需确认github未标认证来源可访问clear审计未展示

image-stitch图像拼接

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

1,582

周安装

64

GitHub Stars

公开资料未说明

下载量

497
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:image-stitch(图像拼接)
来源仓库:https://github.com/nocoo/image-stitch
仓库路径:skills/image-stitch
安装命令:
npx skills add nocoo/image-stitch --skill "image-stitch"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

AgentSkills.tonpx skills
npx skills add nocoo/image-stitch --skill "image-stitch"

简介

用于拼接多张图像生成完整画面。image-stitch 属于图像处理类 Skill,可作为该场景下的辅助能力补充。

  • 适合在 Codex、Claude、Cursor 和 Gemini CLI 中处理图像合成任务。
  • 支持多种宿主环境,提供灵活的图像拼接能力。
  • 使用时需确认输入图像尺寸和对齐方式,确保拼接效果。
  • 安装方式:通过 github 使用 npx skills add 命令安装。

SKILL.md

name
image-stitch
description
Stitches multiple scrolling screenshots into a single image. Supports both vertical (default) and horizontal stitching with automatic overlap detection and alignment using ORB feature matching. Use when user wants to combine sequential screenshots from scrolling content.

Image Stitch Skill

Stitch multiple scrolling screenshots into one seamless image.

Step 1: Ask Stitch Direction

Use the Question tool to ask user ONE question only:

Question: Select stitch direction Options (exactly 2):

  1. Vertical (top to bottom) - (Recommended) For vertically scrolling screenshots
  2. Horizontal (left to right) - For horizontally scrolling screenshots

Step 2: Ask Overlap Size

Use the Question tool to ask user ONE question only:

Question: How much overlap between screenshots? Options (exactly 3):

  1. Small overlap - Screenshots have minimal overlap (~10-20%)
  2. Medium overlap - (Recommended) Screenshots have moderate overlap (~20-40%)
  3. Large overlap - Screenshots have significant overlap (~40%+)

Based on user choice, set the edge parameter for modifying stitch.py:

  • Small: EDGE_PARAM=150
  • Medium: EDGE_PARAM=300
  • Large: EDGE_PARAM=600

Step 3: Setup Environment

CRITICAL: Must run this BEFORE any stitching. The skill directory contains a venv that needs activation.

# Get skill directory (where stitch.py lives)
SKILL_DIR="/path/to/image-stitch"  # Replace with actual skill path

# Activate venv and install dependencies (idempotent)
cd "$SKILL_DIR" && \
python3 -m venv venv 2>/dev/null || true && \
source venv/bin/activate && \
pip install -q opencv-python numpy

# Modify stitch.py edge parameters based on user's overlap choice
EDGE_PARAM=300  # Set this based on Step 2 user choice
sd "edge_h = min\([0-9]+, h1 // 4, h2 // 4\)" "edge_h = min($EDGE_PARAM, h1 // 4, h2 // 4)" stitch.py
sd "edge_w = min\([0-9]+, w1 // 4, w2 // 4\)" "edge_w = min($EDGE_PARAM, w1 // 4, w2 // 4)" stitch.py

Step 4: Prepare Task Folders

Create task folders with timestamp:

TIMESTAMP=$(date +%Y%m%d_%H%M%S)
mkdir -p "$SKILL_DIR/input/$TIMESTAMP"
mkdir -p "$SKILL_DIR/output/$TIMESTAMP"

Step 5: Copy and Rename Images

Copy images from source to input/$TIMESTAMP/, renaming by sequence order.

IMPORTANT: Use find command to handle paths with spaces and special characters correctly.

SOURCE_PATH="/path/to/source"  # User provided path

# Find and copy images, sorted by filename, renamed to 01.png, 02.png, etc.
find "$SOURCE_PATH" -maxdepth 1 -type f \( -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" \) | \
sort | \
nl -nrz -w2 | \
while read num file; do
    cp "$file" "$SKILL_DIR/input/$TIMESTAMP/${num}.png"
done

Verify copied files:

ls -la "$SKILL_DIR/input/$TIMESTAMP/"

Step 6: Execute Stitching

IMPORTANT: Must run with venv activated.

cd "$SKILL_DIR" && source venv/bin/activate && \
python stitch.py \
    -i "input/$TIMESTAMP" \
    -o "output/$TIMESTAMP/stitched.png" \
    --debug \
    [--horizontal]  # Add this flag if user chose horizontal

Step 7: Report Result

After stitching, report to user with full absolute path:

Stitching complete!

Task ID: $TIMESTAMP
Input: $SKILL_DIR/input/$TIMESTAMP/ (<N> images)
Output: $SKILL_DIR/output/$TIMESTAMP/stitched.png (<W>x<H>)

Full output path:
$SKILL_DIR/output/$TIMESTAMP/stitched.png

Step 8: Ask to Open Output Folder

Use the Question tool to ask user ONE question only:

Question: Open output folder in Finder? Options (exactly 2):

  1. Yes - Open the output folder
  2. No - Skip opening folder

If user chooses "Yes", run:

open "$SKILL_DIR/output/$TIMESTAMP"

Script Options

OptionDescription
-i, --inputInput folder (images sorted by filename)
-o, --outputOutput path (default: output/stitched.png)
-H, --horizontalHorizontal stitching mode
--no-detectDisable overlap detection (direct concatenation)
--debugShow detailed matching info

Troubleshooting

ModuleNotFoundError: No module named 'cv2'

Cause: venv not activated or dependencies not installed. Fix: Run Step 3 (Setup Environment) again.

File copy fails with "No such file or directory"

Cause: Paths with spaces or special characters not quoted properly. Fix: Always use find with proper quoting as shown in Step 5.

No matches found: *.{png,jpg}

Cause: Brace expansion {a,b} not supported in all shells. Fix: Use find with -iname instead of glob patterns.

How It Works

  1. Feature Detection: Uses ORB to find keypoints in overlap regions
  2. Matching: Finds corresponding points between consecutive images
  3. Offset Calculation:

- Primary axis: overlap amount (how much images share) - Secondary axis: alignment shift (corrects misalignment)

  1. Stitching: Places images on canvas with calculated offsets
  2. Cropping: Trims to common region

Requirements

  • Python 3.10+
  • opencv-python
  • numpy

Dependencies are auto-installed in venv during Step 2.

Limitations

  • Maximum 10 images per stitch
  • Images should have 20%+ overlap for reliable matching
  • Works best with content-rich areas (not pure solid colors)

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Antigravity

29.35%
按下载量换算146

Codex

21.64%
按下载量换算108

OpenCode

16.23%
按下载量换算81

Gemini CLI

11.24%
按下载量换算56

Claude Code

7.17%
按下载量换算36

clawdbot

3.17%
按下载量换算16

安全审计

暂无安全审计结果可展示。

权限和风险

权限需确认

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

安装前确认

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

来源信息

继续浏览同类 Skills