Hello,
Does anyone know is OCR possible in C2?
eg. jpg or pdf with some text to be read and transfered into variable or via json etc.
tnx!
it can if you can write your own extensions... but that's beyond me. I'm sure there's been something similar on the forums before.
R
well im searching forums for OCR but theres nothing usefull to find <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">
found online some stuff:
http://articles.qiguang.net/2012/04/13/ ... avascript/
http://antimatter15.com/ocrad.js/demo.html
http://stackoverflow.com/questions/2695 ... ml5-canvas
but how to make a plugin out of it is beyond me... <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">
i read that teserract is the best but its not JS based... can outside program be somehow connected to C2?
Maybe? http://kdzwinel.github.io/JS-OCR-demo/
nonom
...and what to do with that?
can anyone point me what needs to be done in order to run this example in browser element: execute js?
thanx!
irina
First you need to load that js library. You can do that by running this js at the start of the layout:
"var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://antimatter15.com/ocrad.js/ocrad.js'; script.onreadystatechange = script.onload = function(){console.log('occad.js loaded');}; head.appendChild(script);"[/code:2pnob2x6] It can take time to load, so you shouldn't try using it right away. You can tweak it so you're signaled when it's done loading but it makes things more complicated, so for now you can wait a second or so before trying to use it. The one function used in that link is OCRAD(c), where "c" is an html5 canvas. The only readily available one would be the game canvas which can be gotten with document.getElementById('c2canvas'). In my test I did this to get the result: time=1 seconds: --- set text to Browser.ExecJS("OCRAD(document.getElementById('c2canvas'))")
R0J0hound
i have some error in NW.js (ocrad.js line 66 col 3)
i browser theres no error but i just can't get this to work... what am i doing wrong!?
https://dl.dropboxusercontent.com/u/169390986/PUB/OCR.capx
thanx!!!
Develop games in your browser. Powerful, performant & highly capable.
Just a side note you can safely remove the second execute javascript action, it does nothing.
I have no solution for that nw.js issue. It's not anything we're doing wrong, it's probably just a problem with the library.
Thank you for your help...
i just realized that mine language is not supported...
i was searching web for hours and i think iw found second best solution:
http://sourceforge.net/projects/capture2text/files/Capture2Text/
Thank you for your help!!!