← 返回
未分类 中文

Signature Extractor

Extract clean, transparent-background signature ink from photos. Use when: user provides a photo of a handwritten signature and asks to remove the background...
从照片中提取干净、背景透明的签名墨迹。适用场景:用户提供了手写签名照片并要求去除背景。
anhao6170 anhao6170 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 1
Stars
📥 191
下载
💾 0
安装
1
版本
#latest

概述

Signature Extractor

Extract handwritten signature ink from photographs or scanned documents, producing a clean transparent-background PNG. Removes white/light backgrounds, red stamps/seals, and colored paper textures while preserving black ink strokes.

When to Run

  • User provides an image and asks to "remove background from signature", "make signature transparent", "extract signature", "remove stamp/印章"
  • User asks to "darken signature ink", "make ink bolder", "填满笔迹", "加深签名"
  • User asks to "upscale signature", "make signature clearer", "提高签名清晰度"
  • User says "去掉底色", "去除背景", "签名透明", "提取签名", "去除印章"

Workflow

  1. Identify the user's desired mode from their request:

| Request keywords | Mode | What it does |

|---|---|---|

| "填满", "加深", "实心", "加粗", "solid", default | solid | 3x upscale + sharpen + pure black opaque ink |

| "高清", "放大", "清晰", "upscale", "hd" | hd | 3x upscale + sharpen + smooth alpha gradient |

| "去掉底色", "提取", "简单去掉", "quick", "extract" | extract | Original size extraction with alpha gradient |

  1. Run the extraction script:

```bash

python3 {baseDir}/scripts/extract_signature.py INPUT_IMAGE OUTPUT.png --mode MODE [--scale N]

```

  • Default scale is 3 (for solid and hd modes). Adjust --scale if user specifies a different multiple.
  • Output is always RGBA PNG format.
  1. After completion, report: output dimensions, ink pixel count, and share the result with the user.

How It Works

The script isolates black ink using a three-channel color filter:

  1. Brightness filter — pixels darker than a threshold are ink candidates
  2. Red channel filter — R minus G must be less than 40, which excludes red stamps/seals
  3. Saturation filter — low saturation ensures only true black/grey ink is captured, not colored marks

For solid and hd modes: LANCZOS upscaling → UnsharpMask sharpening → ink extraction → Alpha channel smoothing.

Prerequisites

pip install Pillow numpy

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-26 23:47

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 216 📥 46,516
design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 329 📥 92,857
design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 424 📥 116,162