MCPcopy Create free account
hub / github.com/creatale/node-dv / FixPageSegMode

Function FixPageSegMode

deps/tesseract/api/tesseractmain.cpp:229–233  ·  view source on GitHub ↗

* We have 2 possible sources of pagesegmode: a config file and * the command line. For backwards compatibility reasons, the * default in tesseract is tesseract::PSM_SINGLE_BLOCK, but the * default for this program is tesseract::PSM_AUTO. We will let * the config file take priority, so the command-line default * can take priority over the tesseract default, so we use the * value from the comm

Source from the content-addressed store, hash-verified

227 * but that doesn't work.
228 */
229void FixPageSegMode(tesseract::TessBaseAPI* api,
230 tesseract::PageSegMode pagesegmode) {
231 if (api->GetPageSegMode() == tesseract::PSM_SINGLE_BLOCK)
232 api->SetPageSegMode(pagesegmode);
233}
234
235// NOTE: arg_i is used here to avoid ugly *i so many times in this function
236void ParseArgs(const int argc, char** argv, const char** lang,

Callers 1

mainFunction · 0.85

Calls 2

GetPageSegModeMethod · 0.80
SetPageSegModeMethod · 0.80

Tested by

no test coverage detected