
Laplacian Variance
- 9 installs
- 1 repo stars
- Updated March 10, 2026
- davidcastagnetoa/skills
Measures image sharpness with the variance of the Laplacian in OpenCV to reject blurry captures before they reach ML models.
About
Uses the OpenCV Laplacian variance to score image sharpness and reject blurry frames as a quality gate before ML processing. Use it to filter low-quality captures ahead of liveness or document analysis.
- Simple cv2.Laplacian variance check with a tunable blur threshold
- Records the sharpness score in the audit event
Laplacian Variance by the numbers
- 9 all-time installs (skills.sh)
- Ranked #1,569 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
- Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/davidcastagnetoa/skills --skill laplacian_varianceAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 9 |
|---|---|
| repo stars | ★ 1 |
| Last updated | March 10, 2026 |
| Repository | davidcastagnetoa/skills ↗ |
What it does
Measures image sharpness with the variance of the Laplacian in OpenCV to reject blurry captures before they reach ML models.
Files
laplacian_variance
La varianza del Laplaciano mide la nitidez de una imagen. Una imagen borrosa tiene varianza baja. Usar como filtro de calidad previo a los modelos ML.
When to use
Aplicar a cada frame capturado antes de enviarlo al liveness_agent o document_processor_agent.
Instructions
1. pip install opencv-python-headless 2. gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) 3. laplacian = cv2.Laplacian(gray, cv2.CV_64F) 4. variance = laplacian.var() 5. Umbral: BLUR_THRESHOLD = 100.0. Si variance < threshold: rechazar. 6. Incluir el score de nitidez en el evento de auditoría.
Notes
- El umbral depende de la resolución; calibrar con imágenes de referencia.
- Complementar con histogram_analysis para detección de calidad completa.
List_Agents.md
list_skills.md
CLAUDE.md
Agents.md
.DS_Store