kaelzhang/penteract-ocr
⭐️ The native node.js bindings to the Tesseract OCR project.
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository Của Tháng
#1 Repository Của Tháng
#1 Repository Của Tháng
🔍 Nhận dạng ký tự qua ảnh trong Node.js với penteract-ocr
Bindings Node.js native cho Tesseract OCR, chạy trực tiếp trong process, không spawn subprocess.
penteract-ocr là một dự án C++ cung cấp Node.js native bindings (dựa trên N-API) cho thư viện Tesseract OCR. Thay vì gọi lệnh tesseract qua command line, dự án nhúng trực tiếp engine OCR vào Node.js để xử lý bất đồng bộ trên libuv, hỗ trợ cả nhận dạng từ buffer và từ file ảnh.
✨ Điểm nổi bật
- Bindings native: Tránh spawn process
tesseract, giảm overhead I/O. - Bất đồng bộ: Đọc và xử lý ảnh trên event loop được libuv quản lý.
- Hỗ trợ buffer: Nhận dữ liệu ảnh dưới dạng JavaScript Buffer.
- Promise-based API:
recognize()vàfromFile()trả về Promise. - Hỗ trợ đa ngôn ngữ: Cấu hình
langdạng string hoặc array (ví dụ:['eng', 'chi_sim']). - Tương thích Electron: Cấu hình
.npmrcđể biên dịch với Electron. - Xử lý lỗi rõ ràng:
ERR_READ_IMAGE,ERR_INIT_TESSERvới message chi tiết.
💡 Vì sao đáng chú ý
Không như các giải pháp OCR khác vốn phải gọi CLI bên ngoài, penteract-ocr nhúng trực tiếp Tesseract vào Node.js thông qua native bindings, giúp tối ưu hiệu năng và dễ tích hợp trong các ứng dụng Node.js hoặc Electron cần nhận dạng văn bản từ ảnh.
#OCR #Tesseract #NodeJS #NativeBindings #OpenSource #TiniX
Similar Projects
Discover other similar projects and AI models.
A community-supported supercharged document management system: scan, index and archive all your documents
OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched
Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
6 MB Tesseract (with English training data) to fit inside AWS Lambda
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.