I have been exploring stable and scalable architecture for lambda based(serverless) application in aws to develop ocr application.
I have successfully implemented and tested the python version of opencv and tesseract-ocr module in aws lambda.
I am interested in doing the same in c++ programming language in aws lambda so that I can use c++ tesseract Tess_Base_API in c++ and also this way we won’t have to convert my existing c++ based codebase into python code.
After doing some research i found that it can be achieved by two ways:
1) Building opencv, tesseract library statically(.a files) and then compiling C++ source code statically to create an executable with no dynamic libs dependency. After that this statically generated C++ executable can be executed using subprocess module in Python in aws lambda.
2) Create a package containing opencv and tesseract dynamic libraries(.so files) and running c++ executable(by pointing path these dynamic library package using 'LD_LIBRARY_PATH') again using subprocess module in Python in aws lambda.
First i tried to build opencv statically by following this link but i did not get success since it was based on alpine linux environment. I am also not able to get any such kind of usage anywhere so i am confused if this approach will even work.
I have been exploring for this feature for the past few days, is someone has done this already or have any information on how it can be done in aws lambda ?
Thanks