Use the native TesseractOCR iOS-framework in Appcelerator Titanium.
Input | Output |
---|---|
- Titanium SDK 6.0.0 or later
- A TesseractOCR language-file placed in
tessdata/*.traineddata
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
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();
cd iphone
appc ti build -p ios --build-only
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.