← 返回
未分类 中文

CamScanner Erase Handwriting

Use CamScanner to erase handwriting from images while preserving the printed content and original layout. Powered by a high-precision image enhancement engin...
使用 CamScanner 去除图片中的手写内容,保留印刷内容和原始布局。依托高精度图像增强引擎……
camscanner-ai camscanner-ai 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 286
下载
💾 0
安装
1
版本
#latest

概述

CamScanner Image Erase Handwriting

Overview

CamScanner provides a high-precision image enhancement engine that removes handwriting from images while preserving the printed content and original layout. It intelligently detects handwritten strokes, annotations, and signatures and erases them, leaving the underlying document clean and legible. The workflow is a 3-step pipeline: upload the image, enhance it with enhance_mode: 9 (erase handwriting), then download the result. For convenience, the enhance step also supports a raw output mode that returns the processed image bytes directly, skipping the download step.

When to Use

  • User wants to remove handwriting, annotations, or signatures from an image
  • User has a scan or photo of a document with handwritten notes that need to be cleaned
  • User wants to restore a blank form after it was filled in by hand
  • User has an annotated scan and needs a clean copy for OCR, printing, or sharing

Privacy & Data

> Important: Privacy & Data Flow Notice

>

> - Third-party service: This skill sends your files to CamScanner's official servers (ai-tools.camscanner.com) for processing.

> - Data retention: CamScanner servers process your files in real-time. Files are not permanently stored on the server.

> - Local files: Output files are saved to your local filesystem at the path you specify.

API Reference

Base URL: https://ai-tools.camscanner.com

Supported Enhancements

source_typeenhance_modeOperationOutput
-----------------------------------------------
image9Erase handwriting.jpg

Step 1: Upload Image

BASE="https://ai-tools.camscanner.com"

IN_FILE_ID=$(curl -sS -X POST "$BASE/v1/tools/upload_file/execute" \
  -H "Content-Type: application/octet-stream" \
  --data-binary "@/path/to/image.jpg" | jq -r '.tool_result.data.file_id')

Response:

{
  "code": 200,
  "tool": "upload_file",
  "tool_result": {
    "success": true,
    "data": {
      "file_id": "file_1741857600_ab12cd34ef56",
      "size": 24576
    }
  }
}

Step 2: Enhance Image (Erase Handwriting)

OUT_FILE_ID=$(curl -sS -X POST "$BASE/v1/tools/enhance_image/execute" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$IN_FILE_ID\",\"enhance_mode\":9,\"output_mode\":\"file_id\"}" \
  | jq -r '.tool_result.data.file_id')

Response:

{
  "code": 200,
  "tool": "enhance_image",
  "tool_result": {
    "success": true,
    "data": {
      "file_id": "file_1741857701_9988aabbccdd",
      "enhance_mode": 9
    }
  }
}

Step 3: Download Result

curl -sS -X POST "$BASE/v1/tools/download_file/execute?response_mode=raw" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$OUT_FILE_ID\"}" \
  -o /path/to/output.jpg

Critical: The response_mode=raw query parameter is required to get the binary file. Without it, the response is JSON.

Alternative: One-Shot Raw Output

If you don't need a reusable file_id for the result, pass "output_mode": "raw" to enhance_image and save the response body directly — this combines steps 2 and 3:

curl -sS -X POST "$BASE/v1/tools/enhance_image/execute" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$IN_FILE_ID\",\"enhance_mode\":9,\"output_mode\":\"raw\"}" \
  -o /path/to/output.jpg

Quick Reference: Complete Pipeline

Erase handwriting from an image (three-step, keeps an output file_id):

BASE="https://ai-tools.camscanner.com"
INPUT_IMAGE="/path/to/image.jpg"
OUTPUT_FILE="/path/to/output.jpg"

# Upload
IN_FILE_ID=$(curl -sS -X POST "$BASE/v1/tools/upload_file/execute" \
  -H "Content-Type: application/octet-stream" \
  --data-binary "@$INPUT_IMAGE" | jq -r '.tool_result.data.file_id')

# Enhance (erase handwriting)
OUT_FILE_ID=$(curl -sS -X POST "$BASE/v1/tools/enhance_image/execute" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$IN_FILE_ID\",\"enhance_mode\":9,\"output_mode\":\"file_id\"}" \
  | jq -r '.tool_result.data.file_id')

# Download
curl -sS -X POST "$BASE/v1/tools/download_file/execute?response_mode=raw" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$OUT_FILE_ID\"}" \
  -o "$OUTPUT_FILE"

Or one-shot (two-step, raw image stream straight from enhance_image):

BASE="https://ai-tools.camscanner.com"
INPUT_IMAGE="/path/to/image.jpg"
OUTPUT_FILE="/path/to/output.jpg"

# Upload
IN_FILE_ID=$(curl -sS -X POST "$BASE/v1/tools/upload_file/execute" \
  -H "Content-Type: application/octet-stream" \
  --data-binary "@$INPUT_IMAGE" | jq -r '.tool_result.data.file_id')

# Enhance + download in one call
curl -sS -X POST "$BASE/v1/tools/enhance_image/execute" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$IN_FILE_ID\",\"enhance_mode\":9,\"output_mode\":\"raw\"}" \
  -o "$OUTPUT_FILE"

Common Mistakes

MistakeFix
--------------------------------------------------------------------------------------------------------------------------------
Forgetting response_mode=raw on downloadAlways append ?response_mode=raw to the download URL
Wrong Content-Type on uploadUpload uses application/octet-stream, not multipart/form-data
Using GET instead of POSTAll endpoints use POST
Passing enhance_mode as a stringenhance_mode is an integer — use 9, not "9"
Missing output_mode in enhance requestMust be either "file_id" (then download separately) or "raw" (stream out)
Parsing JSON when output_mode is "raw"With raw, the response body IS the image — write it to a file with -o
Trying to download a file_id after raw responseraw mode returns no file_id; re-run in file_id mode if you need one

Error Handling

Check each step before proceeding:

# After upload
if [ -z "$IN_FILE_ID" ] || [ "$IN_FILE_ID" = "null" ]; then
  echo "Upload failed"; exit 1
fi

# After enhance (file_id mode)
if [ -z "$OUT_FILE_ID" ] || [ "$OUT_FILE_ID" = "null" ]; then
  echo "Enhancement failed"; exit 1
fi

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-08 02:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

CamScanner-Pdf2Office

camscanner-ai
使用 CamScanner 将 PDF 文档转换为可编辑的 Word(.docx)或 Excel(.xlsx)格式,具备智能内容识别和精准格式保留
★ 0 📥 494
design-media

Nano Banana Pro

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

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 333 📥 94,249