https://github.com/hansemannn/titanium-tesseract-ocr
Use the native TesseractOCR iOS-framework in Appcelerator Titanium.
https://github.com/hansemannn/titanium-tesseract-ocr
appcelerator ios javascript native tesseract-ocr titanium
Last synced: 10 months ago
JSON representation
Use the native TesseractOCR iOS-framework in Appcelerator Titanium.
- Host: GitHub
- URL: https://github.com/hansemannn/titanium-tesseract-ocr
- Owner: hansemannn
- License: other
- Created: 2017-07-05T04:41:32.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-08T21:36:26.000Z (almost 9 years ago)
- Last Synced: 2025-04-15T20:54:50.336Z (about 1 year ago)
- Topics: appcelerator, ios, javascript, native, tesseract-ocr, titanium
- Language: C++
- Size: 24.1 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔠TesseractOCR in Titanium
Use the native TesseractOCR iOS-framework in Appcelerator Titanium.
| Input | Output |
|-------|--------|
|
|
|
## Requirements
- [x] Titanium SDK 6.0.0 or later
- [x] A TesseractOCR language-file placed in `tessdata/*.traineddata`
## API's
### Methods
#### `recognize(args)`
- `image` (String - _Required_)
- `callback` (Function - _Required_)
- `languages` (Array - _Optional_ - Default: `['eng']`)
- `charWhitelist` (Array - _Optional_)
- `charBlacklist` (Array - _Optional_)
- `engineMode` (`ENGINE_MODE_TESSERACT_ONLY`, `ENGINE_MODE_CUBE_ONLY`, `ENGINE_MODE_CUBE_COMBINED` - _Optional_)
- `rect` (Object - _Optional_)
- `x`, `y`, `width`, `height`
## Example
```js
var Tesseract = require('ti.tesseract');
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var btn = Ti.UI.createButton({
title: 'Recognize Image'
});
btn.addEventListener('click', function() {
Tesseract.recognize({
image: 'image_sample_tr.png',
callback: function(e) {
alert('Text: ' + e.recognizedText);
}
});
});
win.add(btn);
win.open();
```
## Build
```js
cd iphone
appc ti build -p ios --build-only
```
## Legal
This module is Copyright (c) 2017-Present by Appcelerator, Inc. All Rights Reserved.
Usage of this module is subject to the Terms of Service agreement with Appcelerator, Inc.