NeutrinosPlatform / cordova-plugin-mobile-ocr

A cordova plugin that can accept image URI or Base64 data and returns the text present in the image as string without need for network. You can also try :- https://github.com/NeutrinosPlatform/cordova-plugin-ml-text
MIT License
49 stars 30 forks source link

Success callback returning exception String #7

Closed basurahan closed 5 years ago

basurahan commented 5 years ago

navigator.camera.getPicture(function(imagedata){ textocr.recText(0, 3, imagedata, function(text){ alert(text); }, function(e){ alert(e); }); }, function(e){ alert(e); }, { quality: 100, correctOrientation: true });

the success callback in the ocr alerts string "Exception"

ChrisTomAlx commented 5 years ago

Hey @thekingrenz23

What version of the plugin are you using?

If you are using 2.x.x then remove the returntype (here 3). So your code would change to :

navigator.camera.getPicture(function(imagedata){ textocr.recText(0, imagedata, function(text){ alert(text); }, function(e){ alert(e); }); }, function(e){ alert(e); }, { quality: 100, correctOrientation: true });

Notice I removed the 3

Let me know if it helps or if it didn't. We will see what to do from there.

Cheers, Chris Neutrinos