1#include <boost/date_time/posix_time/conversion.hpp>
2#include <boost/date_time/posix_time/posix_time.hpp>
5#include <leptonica/allheaders.h>
7#include <tesseract/baseapi.h>
15 tesseract::TessBaseAPI *api =
new tesseract::TessBaseAPI();
17 if (api->Init(NULL,
"eng")) {
18 log_cmd(
"Unable to initialize tesseract-ocr",
"OCR",
19 boost::posix_time::to_time_t(
20 boost::posix_time::second_clock::universal_time()),
26 outText = api->GetUTF8Text();
31 return std::string(outText);