auerswal / ssocr

Seven Segment Optical Character Recognition
https://www.unix-ag.uni-kl.de/~auerswal/ssocr/index.html
GNU General Public License v3.0
202 stars 38 forks source link

Hints on integrating ssocr with c++ #18

Closed panwauu closed 2 years ago

panwauu commented 2 years ago

Do you have any hints for me on how I can integrate ssocr directly in a C++ script without hacking it over the cli. Currently I save the image, call ssocr over the cli and then read the result. This is obviously not the best solution. I dont have a lot of experience so I am happy for help.

auerswal commented 2 years ago

Perhaps calling an external ssocr binary is not that bad. You could consider providing the image data on standard input instead of saving it to a file (then ssocr would save it to a file automatically, but in a quite simple way without any optimization), so this would just free from you having to implement this temporary file handling in your code.

I have never intended for ssocr to be used as a library, and I have no intention to change that. Thus I cannot describe how to integrate it into C or C++ nicely.

panwauu commented 2 years ago

Thanks for your comment