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
| 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. |
| 119 | bool 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 |
no test coverage detected