Remove Watermark
by @wxttt
Remove light-colored text watermarks from white-background document images (exam papers, scanned documents). No API key needed - pure local image processing....
clawhub install remove-watermarkπ About This Skill
name: remove-watermark description: Remove light-colored text watermarks from white-background document images (exam papers, scanned documents). No API key needed - pure local image processing. Use when the user wants to remove watermarks, clean up document screenshots, or remove light text overlays from images.
Remove Watermark
Remove watermarks from white-background document images. Pure local processing, no API key needed.
When to Use
Trigger this skill when the user wants to:
Workflow: 4-Step Process
The script path is scripts/remove_watermark.py relative to this SKILL.md.
Use uv run --with Pillow --with numpy (add --with scipy only when using --region full).
Step 1: Visual Analysis (Claude reads the image)
Use the Read tool to look at a sample image. Identify:
Estimate the watermark region as approximate percentages: y0%, y1%, x0%, x1%.
Step 2: Brightness Analysis (script analyzes the region)
Run the analyze subcommand on the watermark region to determine the right threshold:
uv run --with Pillow --with numpy python3 /scripts/remove_watermark.py analyze --region "y0,y1,x0,x1"
Example: analyze sample.jpg --region "94,100,60,100"
This prints brightness distribution and a suggested threshold.
Step 3: Remove Watermark
Use the suggested threshold and region from Steps 1-2:
# Region mode (preferred - zero damage to text outside the region)
uv run --with Pillow --with numpy python3 /scripts/remove_watermark.py remove -o Region presets: bottom-right, bottom-left, top-right, top-left, bottom, top, right, left, center, full
Custom region: --region "y0,y1,x0,x1" as percentages (e.g., "94,100,60,100" = bottom 6%, right 40%)
Step 4: Verify and Auto-Retry
Use the Read tool to check the output image. You MUST verify and retry if needed β do not stop after one attempt.
Check these two things: 1. Is the watermark gone? 2. Is the text content intact (not lightened or damaged)?
If watermark is still visible, retry with adjusted parameters:
| Problem | Fix | |---------|-----| | Watermark still visible | Lower the threshold (e.g., 180 β 130 β 80) | | Only partially removed | Expand the region (e.g., widen by 5-10% in each direction) | | Text got damaged/lightened | Raise the threshold or shrink the region to avoid text areas | | Wrong area processed | Re-examine the image and correct the region coordinates |
Retry rules:
analyze didn't work, try halving itCommand Reference
analyze
remove_watermark.py analyze [--region REGION]
Prints brightness distribution and suggested threshold for a region.
remove
remove_watermark.py remove [-o OUTPUT] [--region REGION] [--threshold N] [--enhance]
| Flag | Default | Description |
|------|---------|-------------|
| --region | full | Region to process (preset name or y0,y1,x0,x1) |
| --threshold | 180 | Brightness cutoff for watermark pixels |
| --enhance | off | Boost text contrast after removal |
| --preview | off | Print stats without saving |