
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
For text extraction from images on a simple way / Para extraer texto de imagenes de forma sencilla
Asegúrate de tener instalados:
Puedes instalar todo con:
pip install opencv-python scikit-image pytesseract matplotlib
from simply_ocr import (
read_image_en, read_image_es, get_available_languages,
save_text_to_file, show_preprocessed_image
)
# Extraer texto en inglés o español
read_image_en('test.jpg')
read_image_es('test.jpg')
# Extraer texto de una región específica y mostrar la imagen preprocesada
roi = (100, 200, 300, 100) # x, y, w, h
texto = read_image_en('test.jpg', preprocess_opts={'roi': roi, 'binarize': True, 'remove_noise': True})
show_preprocessed_image('test.jpg', preprocess_opts={'roi': roi})
# Guardar el texto extraído en un archivo
if texto:
save_text_to_file(texto, 'salida.txt')
# Consultar los idiomas disponibles en tu instalación de Tesseract
print(get_available_languages())
Extrae texto de facturas, recibos, contratos o cualquier documento escaneado para su almacenamiento o análisis automatizado.
texto = read_image_es('factura.png')
print(texto)
Ideal para extraer texto de fotos tomadas con el móvil, por ejemplo, carteles, pizarras o notas manuscritas.
texto = read_image_es('foto_pizarra.jpg', preprocess_opts={'binarize': True, 'remove_noise': True})
Extrae texto solo de una parte de la imagen, útil para formularios o layouts fijos.
roi = (50, 100, 200, 50) # x, y, w, h
texto = read_image_es('formulario.png', preprocess_opts={'roi': roi})
Guarda automáticamente el texto extraído para su posterior procesamiento o integración con otros sistemas.
texto = read_image_es('ticket.jpg')
if texto:
save_text_to_file(texto, 'ticket.txt')
Ajusta parámetros y visualiza el resultado para mejorar la precisión del OCR.
show_preprocessed_image('documento.jpg', preprocess_opts={'contrast': 1.5, 'binarize': True})
preprocess_opts
en las funciones.matplotlib
instalado.FAQs
Read text from images
We found that simply-ocr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.