UNPKG

fv

Version:

FormVision is a node.js library for extracting data from scanned forms

16 lines (12 loc) 389 B
// Generated by CoffeeScript 2.3.1 var dv, tesseractInstance; dv = require('dv'); tesseractInstance = null; // Return a binarized version of *image*. Currently uses Tesseract for this. module.exports = function(image) { if (tesseractInstance == null) { tesseractInstance = new dv.Tesseract(); } tesseractInstance.image = image; return tesseractInstance.thresholdImage(); };