283 int maxCharactersToTry = 5 * minCharactersToTry;
291 BLOBNBOX_C_IT filtered_it(blob_list);
292 int real_max = std::min(filtered_it.length(), maxCharactersToTry);
298 if (real_max < minCharactersToTry / 2) {
299 tprintf(
"Too few characters. Skipping this page\n");
303 auto** blobs =
new BLOBNBOX*[filtered_it.length()];
304 int number_of_blobs = 0;
305 for (filtered_it.mark_cycle_pt (); !filtered_it.cycled_list ();
306 filtered_it.forward ()) {
307 blobs[number_of_blobs++] = filtered_it.data();
310 int num_blobs_evaluated = 0;
311 for (
int i = 0; i < real_max; ++i) {
313 && i > minCharactersToTry) {
316 ++num_blobs_evaluated;
321 int orientation = o.get_orientation();
323 return num_blobs_evaluated;
bool os_detect_blob(BLOBNBOX *bbox, OrientationDetector *o, ScriptDetector *s, OSResults *osr, tesseract::Tesseract *tess)
DLLSYM void tprintf(const char *format,...)
void update_best_script(int orientation_id)
int min_characters_to_try