actiona
actiona copied to clipboard
OCR?
I've seen there are many OCR libraries available. Any chances you could implement one so, say, after an image is found, you can look at a related near-by area to pull some text? I actually wanted to convert the text into numbers also, then run logic on it ... would be awesome! :)
You should also think about integrating the Monaco editor for TypeScript support. ;)
Yea, OCR will be so helpful
I've seen there are many OCR libraries available. Any chances you could implement one so, say, after an image is found, you can look at a related near-by area to pull some text? I actually wanted to convert the text into numbers also, then run logic on it ... would be awesome! :)
I did have a look at that a few years back, but did not find any C++ library that was cross platform and free software/open source. There are online services, but they often require a subscription and/or don't provide an API to interact with. Things may have changed since then. I'll have a look.
You should also think about integrating the Monaco editor for TypeScript support. ;)
Hm. That would mean using an integrated browser to edit code? Seems a bit of an overkill, but it may be better to what we have now. By the way, Actiona doen't use TypeScript but EcmaScript/JavaScript. That would be something else. To be honest, Actiona is using JS because Qt provides a nice binding for it (even if it's now deprecated without any replacement). I personally would have preferred a typed language like Golang or AngelScript.
TypeScript IS JavaScript with types added. It’s designed by the same creator as Delphi, who now works of MS, and is the main language behind Google’s Angular. It IS JavaScript with static types, and transpiles to JavaScript using their compiler that itself is also javascript. It would mean far less changes for you and adds the missing static types, refactoring, and more. ;) It could be as easy as integrating CEF/CEFSharp, displaying the editor in a web control, then taking the transpiled JS code, all done for you. ;)
Yes I know. I would have to integrate CEF (Actiona is developed in C++), and that would add quite some weight to the installer and the SFX scripts. The libcef.dll
is 100 MB in the minimal Windows example.
Not sure if it helps, but I came across this once and was thinking of checking it out: http://www.pixel-technology.com/freeware/tessnet2/ It uses Tesseract, a C++ open source OCR engine. No idea how good it is, but could be interesting to give it a try. :) I've seen other automation software use it this way: when some image is found, it will look at some offset from it for text in an area you specify. You already have the first part (find image). Perhaps the OCR action can read from either an absolution location, OR from an offset from a position (i.e. the last image found location + offset + width and height of area to convert).
It uses Tesseract, a C++ open source OCR engine. No idea how good it is, but could be interesting to give it a try. :)
Tessnet2 itself uses .Net, so it is not usable by Actiona which is developed in C++, however Tesseract could be used since it is written in this language and uses a compatible license.
I've had a look at the Windows binary: it is 60 MB, but can be compressed to 16 MB using UPX, so that could be okay. I will need to refactor action packs anyway, so that when exporting an SFX script the user can choose if they want to include dependencies like OpenCV or Tesseract. I can also try to auto-detect such usage by scanning the source code.
I've seen other automation software use it this way: when some image is found, it will look at some offset from it for text in an area you specify. You already have the first part (find image). Perhaps the OCR action can read from either an absolution location, OR from an offset from a position (i.e. the last image found location + offset + width and height of area to convert).
That's interesting. I think that could use with relative ease. I see that Tesseract uses some datafiles depending on the language of the text you want to scan, so that would be a parameter to add to an action or a function in code. Many Actiona users are French, so it would be nice to support this language in addition to English at least.
I was only referring to Tesseract, as it is C++, and I’m aware Actiona is also. ;)
[…]To be honest, Actiona is using JS because Qt provides a nice binding for it (even if it's now deprecated without any replacement). […]
Isn't this the replacement?
https://doc.qt.io/qt-5/qjsengine.html
I might be wrong. It does perhaps not have the same features / use?
Almost, but not completely. It's missing a debugger and a UI for it. This also means that it is currently not possible to upgrade Actiona to use Qt 6.