-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.js
More file actions
20 lines (17 loc) · 780 Bytes
/
Copy pathexample.js
File metadata and controls
20 lines (17 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict';
var sceneText = require('bindings')('scene_text_detector');
var util = require('util');
var fs = require('fs');
var result;
console.log('-----------------------------------------------------');
fs.readFile('./sample_images/3.jpg', function(error, data) {
if (!error) {
var result = sceneText.GetTextCropSync(data, __dirname, '0123456789ABCDEFGHJKLMNPRSTUVWXYZ', 0, 0, 440, 330, 90);
console.log(util.inspect(result, {depth: 9, colors: true}));
} else {
console.log('Load Image from Path failed');
return undefined;
}
});
//var result2 = sceneText.GetTextCropSync('./sample_images/3.jpg', __dirname, '0123456789ABCDEFGHJKLMNPRSTUVWXYZ', 140, 133, 150, 33);
//console.log(util.inspect(result2, {depth: 9, colors: true}));