camera, snapshots, ocr v.1

This commit is contained in:
LukasNowy
2019-01-17 22:13:00 +01:00
parent 26b9e99778
commit 90351cc74f
12 changed files with 21720 additions and 0 deletions

View File

@ -0,0 +1,27 @@
$(document).ready(function() {
//initialize all modals
$('.modal').modal();
$(".btnanalyze").click(function() {
analyze();
});
});
function analyze() {
var img = document.getElementById("canvas").toDataURL();
Tesseract.recognize(img).progress((progress) => {
console.log(progress, "$$$$");
if (progress.status == "recognizing text") {
$(".determinate").css("width", progress.progress * 100 + "%");
}
}).then((result) => {
console.log(result);
$(".output").text(result.text);
$('.modal').modal("open");
$(".determinate").css("width", "0%");
});
}