clean-watermark-img
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "clean-watermark-img" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-01ac6eb5a444d05ed94d54709b21167cb518d894d2cab8ea3becb0526e79bce8. Verify the upstream source and version against https://skillhub.cn/skills/user_9ddd2a0a/clean-watermark-img before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
An image watermark removal tool that uses OpenCV image inpainting algorithms (Telea / Navier–Stokes) to remove watermark text from images while preserving original image quality. Suitable for removing AI-generated watermarks, platform watermarks, corner text, and similar cases. Supports automatic detection of light-colored text watermark areas and also allows manual specification of watermark coordinate ranges.
Introduction source: third_party · user_9ddd2a0a · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Software, accounts and paid services
- "<managed_python>" -m venv "<venv_path>"
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: ochmd-img-clean-watermask
description: "图片水印去除工具。使用 OpenCV 图像修复算法(Telea / Navier-Stokes)去除图片中的水印文字,保留原图画质。适用于去除 AI 生成水印、平台水印、角标文字等场景。当用户提到去水印、去除水印、remove watermark、清除角标、去掉AI生成标记时触发此 skill。支持自动检测浅色文字水印区域,也支持手动指定水印坐标范围。"
agent_created: true图片水印去除工具
概述
使用 OpenCV 的图像修复(inpainting)算法去除图片中的水印文字,输出 PNG 无损格式以保持画质。
核心脚本 scripts/remove_watermark.py 封装了完整的处理流程:灰度转换 → 阈值检测 → 掩码膨胀 → Telea 修复。
适用场景
- AI 生成图片的 "AI 生成" 角标水印
- 平台/APP 添加的角标文字水印(如抖音、小红书等)
- 图片角落的半透明文字标识
使用前提
需安装 OpenCV 和 Pillow。使用 managed Python 创建独立虚拟环境:
# 创建虚拟环境(仅需一次)
"<managed_python>" -m venv "<venv_path>"
# 安装依赖
"<venv>/Scripts/pip.exe" install opencv-python pillow
注意:所有 Python 调用均使用绝对路径,不要用裸命令
python。
工作流程
1. 确认输入图片路径
获取用户要去水印的图片完整路径。支持 JPG / JPEG / PNG / BMP / WEBP 格式。
2. 确定水印区域
两种方式确定水印位置:
方式 A — 自动检测(默认)
脚本默认在图片左上角区域(宽 15% × 高 6%)自动检测浅色文字。适用于大多数角标水印。
方式 B — 手动指定坐标
如果水印不在左上角,或自动检测效果不佳,让用户提供水印的大致位置:
- 水印在哪个角落?(左上 / 右上 / 左下 / 右下 / 中间)
- 大概占图片多大面积?
然后在脚本调用中传入 --corner 和 --roi 参数。
3. 执行去水印
运行脚本:
"<venv_python>" scripts/remove_watermark.py \
--input "<图片路径>" \
--output "<输出路径>" \
--corner topleft \
--roi-w 0.15 \
--roi-h 0.06 \
--threshold 180 \
--inpaint-radius 5 \
--method telea
参数说明:
| 参数 | 默认值 | 说明 |
|---|---|---|
--input |
(必填) | 输入图片路径 |
--output |
自动生成 | 输出路径,默认在输入同目录加 _no_watermark.png |
--corner |
topleft |
水印位置:topleft / topright / bottomleft / bottomright / center |
--roi-w |
0.15 |
水印区域宽度占图片宽度的比例 |
--roi-h |
0.06 |
水印区域高度占图片高度的比例 |
--threshold |
180 |
灰度阈值,高于此值视为水印文字(0-255) |
--inpaint-radius |
5 |
修复半径(像素),越大越平滑但可能模糊更多 |
--method |
telea |
修复算法:telea(快速行进法)或 ns(Navier-Stokes) |
4. 验证结果
处理完成后,读取输出图片确认水印是否完全去除:
- 如果残留文字痕迹 → 调大
--inpaint-radius(如 7-10)或调低--threshold(如 150) - 如果误伤了正常内容 → 缩小
--roi-w/--roi-h范围 - 如果背景修复不自然 → 尝试
--method ns
5. 交付结果
将处理后的图片通过 present_files 展示给用户。默认输出 PNG 无损格式。
注意事项
- 输出格式固定为 PNG 以保证无损质量
- 脚本使用相对路径引用(
scripts/remove_watermark.py),在 skill 目录内运行 - 对于复杂背景(渐变、纹理),
ns方法通常比telea效果更好 - 如果水印带有半透明背景框,可能需要调高
--threshold并增大--roi范围
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 AI 生成图片水印去除的实际痛点
- 适用于多种常见水印场景(平台角标、AI 生成标记等)
Highlights
- 触发词覆盖中英文,边界清晰
- description 位置正确且内容完整
Highlights
- 文档结构完整,Phase 清晰
- 包含详细的参数说明和调优建议
Areas to improve
-
缺少基础异常处理说明 Reported severity: Minor
未显式说明输入图片不存在、格式不支持等基础异常的处理方式
Recommendation: 建议在注意事项或工作流程中补充对输入文件校验和常见错误的处理说明
Highlights
- 工具来源明确(OpenCV)
- 提供了详细的参数调优策略
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
"<managed_python>" -m venv "<venv_path>"
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.