Agent skill · AI & Agents

matlab-ocr

Build OCR pipelines in MATLAB using the ocr() function. Use this skill when the user wants to read text from images, documents, signs, meters, displays, license plates, gauges, receipts, or seven-segment displays. Covers image preprocessing, text detection (CRAFT, MSER), ROI-based recognition, multi-language OCR, and custom model training. Use when: OCR, text recognition, extract text from image, character recognition, document scanning, meter reading, gauge reading, receipt scanning, digitize text from photo.

matlabgithub.com/matlabGitHub ↗
claude-codecodexcopilotNOASSERTION
Install
npx skills add matlab/matlab-agentic-toolkit --skill matlab-ocr --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 9
SKILL.md size: 20 KB
Bundled scripts: none
Version: 1.0
Declared author: MathWorks
Path: skills-catalog/image-processing-and-computer-vision/matlab-ocr/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 868
Language: MATLAB

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Use MATLAB's OCR workflow to read text from images by diagnosing the input, preprocessing, detecting text regions, recognizing text, and validating results. It supports multi-language OCR, ROI-based recognition, and can incorporate image preprocessing and custom model training when reading text from various sources (documents, signs, meters, displays, license plates, gauges, receipts, seven-segment displays).

How it works

  • Always diagnose before executing and provide a two-line image characterization plus an explicit OCR plan.
  • Restrict preprocessing pipelines to a maximum of two attempts unless the user approves another approach.
  • When passing bounding boxes to ocr(), always set the LayoutAnalysis parameter (e.g., LayoutAnalysis="word" or LayoutAnalysis="block").
  • Distinguish text-on-textured-background vs. text formed by the surface itself and apply the recommended detection approach (imsegsam for text-on-texture; local contrast subtraction for surface-text text).
  • Default to detectTextCRAFT for scene text detection, unless there is a specific reason to choose otherwise.
  • Check polarity first; invert with imcomplement if needed.
  • Do not reveal OCR results to the user before writing the ocr pipeline and decision log files.
  • Gate add-on functions by availability checks (detectTextCRAFT, imsegsam) and log the results; if missing, request installation of the corresponding MATLAB add-ons.
  • Follow the workflow: diagnose, plan, detect, recognize, validate, and only then present final OCR results after files are written.

When to use it

  • Reading text from images like documents, signs, meters, displays, labels, or seven-segment displays
  • Extracting text from scanned documents, photographs, or datasets
  • Multilingual text recognition
  • Supporting steps in other computer vision workflows where text provides context

What it can touch

  • Tools and functions referenced include: ocr(), detectTextCRAFT, imsegsam, imcomplement, imresize, imrotate, imtop and other preprocessing operators (as described in the plan). The skill requires ensuring these functions exist via MCP existence checks before use and logs the availability.

Caveats

  • The skill emphasizes diagnosis before execution and limits to at most two preprocessing pipelines unless user approves more.
  • It requires LayoutAnalysis when passing bounding boxes to ocr() and cautions against using OCR results before writing the pipeline and decision log files.
  • It notes limitations such as handwriting, stylized text, CAPTCHAs, and full document layout analysis as unsupported cases.
  • It mandates that add-on availability checks be performed and logged; if missing, it asks the user to install the required package.
From the SKILL.md

# Recognize Text in Images Using OCR Use the Computer Vision Toolbox `ocr` function with preprocessing from Image Processing Toolbox to extract text from images. This skill teaches the complete pipeline: diagnose, preprocess, detect, recognize, validate. ## When to Use - Reading text from any image (documents, signs, meters, displays, labels) - Extracting text from scanned documents or photographs - Reading seven-segment displays or specialized fonts - Multi-language text recognition - Automating text extraction from image datasets - As a supporting step in other CV workflows — reading text in a scene (labels, timestamps, serial numbers) gives additional context for downstream image analysis ## When NOT to Use - Pure handwriting recognition — cursive/connected script produces garbage regardless of preprocessing - Artistic text, WordArt, brush calligraphy — the OCR engine cannot parse stylized letterforms - CAPTCHAs — designed specifically to defeat OCR; expect <50% accuracy at best - Full document layout analysis with table extraction (use custom segmentation) - Real-time video OCR (use streaming approaches instead) - Image contains no text at all ## Critical Rules These rules are

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Critical Rules
  4. Anti-Patterns — Do NOT Do This
  5. Workflow
  6. Progress Reporting + Output Template
  7. Step 1: Diagnose
  8. Step 2: Preprocess the Image
  9. Step 3: Detect Text Regions (Critical)
  10. Step 4: Recognize Text
  11. Step 5: Validate Results
  12. Step 6: Save Pipeline + Log
  13. Quick Reference
  14. Custom Model Training
Ships with 8 files
  • manifest.yaml
  • reference/batch-pipeline.md
  • reference/detection-methods.md
  • reference/function-reference.md
  • reference/limitations.md
  • reference/preprocessing-guide.md
  • reference/supported-languages.md
  • reference/training-guide.md
More from matlab-agentic-toolkit
All skills →
About this skill
What does the matlab-ocr skill do?

Build OCR pipelines in MATLAB using the ocr() function. Use this skill when the user wants to read text from images, documents, signs, meters, displays, license plates, gauges, receipts, or seven-segment displays. Covers image preprocessing, text detection (CRAFT, MSER), ROI-based recognition, multi-language OCR, and custom model training. Use when: OCR, text recognition, extract text from image, character recognition, document scanning, meter reading, gauge reading, receipt scanning, digitize text from photo.

How do I install it?

Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-ocr --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going