# ocr-preprocessing-optimizer

This subagent prepares images for text recognition by correcting skew, adjusting contrast, and reducing noise. Use it when document image quality is getting in the way of OCR.

- subagent · `type=agent` · Claude Code · 583 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/ocr-extraction-team/ocr-preprocessing-optimizer.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/ocr-preprocessing-optimizer

## What it does

The subagent assesses an image and prepares it for text extraction. It can correct rotation, skew, and perspective, tune brightness and contrast, reduce noise, remove backgrounds, isolate text areas, adjust resolution, and convert formats. The goal is to retain the original content while improving the image for OCR.

Possible outputs include processed images, preprocessing settings, before-and-after comparisons, and quality recommendations. The description also covers batch workflows for similar documents and estimates of OCR accuracy gains. It has access to `Read`, `Write`, and `Bash`, so file changes depend on access to those tools.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent ocr-extraction-team/ocr-preprocessing-optimizer
```

2. **Manually: put the files in place**
- File: `.claude/agents/ocr-preprocessing-optimizer.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/ocr-preprocessing-optimizer.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/ocr-preprocessing-optimizer.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/ocr-extraction-team/ocr-preprocessing-optimizer.md

## When to use it
- straighten a scanned page with skew or perspective distortion
- reduce image noise and remove artifacts before OCR
- improve text contrast in a document image
- prepare a batch of similar documents for text extraction

## Example prompts
- Prepare this scan for OCR: straighten the text and reduce noise.
- Improve the contrast and clarity of the text in this image.
- Compare the image before and after processing, then suggest settings for similar documents.

## Similar
- [prompt-engineer](https://affpapa.org/en/nevibecode/agents/voltagent-community-prompt-engineer.md) — subagent · 16078 installs
- [prompt-engineer](https://affpapa.org/en/nevibecode/agents/prompt-engineer.md) — subagent · 16078 installs
- [ai-engineer](https://affpapa.org/en/nevibecode/agents/voltagent-community-ai-engineer.md) — subagent · 7687 installs
- [ai-engineer](https://affpapa.org/en/nevibecode/agents/ai-engineer.md) — subagent · 7687 installs
- [search-specialist](https://affpapa.org/en/nevibecode/agents/search-specialist.md) — subagent · 6886 installs
- [business-analyst](https://affpapa.org/en/nevibecode/agents/business-analyst.md) — subagent · 3855 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
