davidcastagnetoa/skills

clahe

Normalización adaptativa de histograma (CLAHE) para mejorar legibilidad del texto del documento

First seen Mar 2, 2026

Installation

$ npx skills add davidcastagnetoa/skills --skill clahe

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from davidcastagnetoa/skills · top by installs.

npx skills add davidcastagnetoa/skills

Browse all from davidcastagnetoa/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,217 B
  • docs SUMMARY.md 109 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 14 installs

SKILL.md

clahe

CLAHE (Contrast Limited Adaptive Histogram Equalization) mejora el contraste local del documento, haciendo el texto más legible para OCR sin sobre-amplificar el ruido.

When to use

Aplicar después de la corrección de perspectiva, antes de OCR y face extraction.

Instructions

  1. Convertir imagen a espacio LAB: lab = cv2.cvtColor(warped, cv2.COLOR_BGR2LAB).
  2. Extraer canal L: l, a, b = cv2.split(lab).
  3. Aplicar CLAHE al canal L: clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8,8)). l_enhanced = clahe.apply(l).
  4. Reconstruir imagen: enhanced = cv2.merge([lenhanced, a, b]). result = cv2.cvtColor(enhanced, cv2.COLORLAB2BGR).
  5. Para OCR, convertir adicionalmente a escala de grises y binarizar con Otsu: , binary = cv2.threshold(gray, 0, 255, cv2.THRESHBINARY + cv2.THRESH_OTSU).

Notes

  • clipLimit=2.0 evita sobre-amplificación de ruido; ajustar si el documento tiene sombras severas.
  • tileGridSize=(8,8) funciona bien para documentos A4/ID-1; ajustar para otros tamaños.