kdzwinel / JS-OCR-demo

JavaScript optical character recognition demo
https://kdzwinel.github.io/JS-OCR-demo/
GNU General Public License v2.0
479 stars 154 forks source link

MediaStreamTrack.getSources is deprecated, update it to MediaDevices.enumerateDevices() #7

Open srinusoft opened 7 years ago

srinusoft commented 7 years ago

Hi,

i am building this as Cordova Project and copies all html and js files to my Project and camera is not opening when i am trying to take the picture. when i look at the logs it says "MediaStreamTrack.getSources is deprecated", Could you please let me know the alter native to this,

kdzwinel commented 7 years ago

Hi! AFAIK the replacement for this deprecated method is: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices . I'd appreciate PR if you'd be able to fix it in my project.

srinusoft commented 7 years ago

Sorry for the confusion. i am building it as android app using cordova, i was missed to add some camera permissions. Now it is working fine but the text from image is not capturing correctly.

kdzwinel commented 7 years ago

well, the OCR library I'm using is not in the latest version - you can try updating it. You can also try using other, more promising, library - tesseract.projectnaptha.com . Also, note that using camera via web platform doesn't support focus AFAIK, so images may be blurred.

ve3 commented 5 years ago

Maybe this issue is the same. https://github.com/kdzwinel/JS-OCR-demo/issues/8