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

Function ReadNextBox

deps/tesseract/ccstruct/boxread.cpp:119–122  ·  view source on GitHub ↗

TODO(rays) convert all uses of ReadNextBox to use the new ReadAllBoxes. Box files are used ONLY DURING TRAINING, but by both processes of creating tr files with tesseract, and unicharset_extractor. ReadNextBox factors out the code to interpret a line of a box file so that applybox and unicharset_extractor interpret the same way. This function returns the next valid box file utf8 string and coords

Source from the content-addressed store, hash-verified

117// utf8_str is set with the unichar string, and bounding box with the box.
118// If there are page numbers in the file, it reads them all.
119bool ReadNextBox(int *line_number, FILE* box_file,
120 STRING* utf8_str, TBOX* bounding_box) {
121 return ReadNextBox(-1, line_number, box_file, utf8_str, bounding_box);
122}
123
124// As ReadNextBox above, but get a specific page number. (0-based)
125// Use -1 to read any page number. Files without page number all

Callers 1

Calls 1

ParseBoxFileStrFunction · 0.85

Tested by

no test coverage detected