#include "cjkpitch.h"
#include <tesseract/genericvector.h>
#include "topitch.h"
#include "tovars.h"
#include <algorithm>
#include <vector>
Go to the source code of this file.
◆ compute_fixed_pitch_cjk()
void compute_fixed_pitch_cjk |
( |
ICOORD |
page_tr, |
|
|
TO_BLOCK_LIST * |
port_blocks |
|
) |
| |
Definition at line 1040 of file cjkpitch.cpp.
1042 FPAnalyzer analyzer(page_tr, port_blocks);
1043 if (analyzer.num_rows() == 0)
return;
1045 analyzer.Pass1Analyze();
1046 analyzer.EstimatePitch(
true);
1050 analyzer.Pass1Analyze();
1051 analyzer.EstimatePitch(
true);
1054 if (!analyzer.maybe_fixed_pitch()) {
1056 tprintf(
"Page doesn't seem to contain fixed pitch rows\n");
1061 unsigned iteration = 0;
1063 analyzer.MergeFragments();
1064 analyzer.FinalizeLargeChars();
1065 analyzer.EstimatePitch(
false);
1067 }
while (analyzer.Pass2Analyze() && iteration < analyzer.max_iteration());
1070 tprintf(
"compute_fixed_pitch_cjk finished after %u iteration (limit=%u)\n",
1071 iteration, analyzer.max_iteration());
1074 analyzer.OutputEstimations();