197 lastdot = strrchr (name.
string (),
'.');
198 if (lastdot !=
nullptr)
199 name[lastdot-name.
string()] =
'\0';
202 int width = pixGetWidth(tess->pix_binary());
203 int height = pixGetHeight(tess->pix_binary());
210 TO_BLOCK_LIST land_blocks, port_blocks;
211 remove_nontext_regions(tess, &blocks, &port_blocks);
213 if (port_blocks.empty()) {
215 tess->mutable_textord()->find_components(tess->pix_binary(),
216 &blocks, &port_blocks);
223 tess->mutable_textord()->filter_blobs(page_box.
topright(),
227 return os_detect(&port_blocks, osr, tess);
const ICOORD & topright() const
const char * string() const
int os_detect(TO_BLOCK_LIST *port_blocks, OSResults *osr, tesseract::Tesseract *tess)
bool read_unlv_file(STRING name, int32_t xsize, int32_t ysize, BLOCK_LIST *blocks)
void FullPageBlock(int width, int height, BLOCK_LIST *blocks)