Definition at line 115 of file equationdetect_test.cc.
◆ AddBlobIntoPart()
void tesseract::EquationFinderTest::AddBlobIntoPart |
( |
const TBOX & |
tbox, |
|
|
ColPartition * |
part |
|
) |
| |
|
inlineprotected |
Definition at line 172 of file equationdetect_test.cc.
172 {
173 CHECK(part !=
nullptr);
174 auto *blob = new BLOBNBOX();
175 blob->set_bounding_box(tbox);
176 part->AddBox(blob);
177 }
◆ AddPageBlock()
void tesseract::EquationFinderTest::AddPageBlock |
( |
Image |
pix, |
|
|
BLOCK_LIST * |
blocks |
|
) |
| |
|
inlineprotected |
Definition at line 140 of file equationdetect_test.cc.
140 {
141 CHECK(pix !=
nullptr);
142 CHECK(blocks !=
nullptr);
143 BLOCK_IT block_it(blocks);
144 auto *block = new BLOCK("", true, 0, 0, 0, 0, pixGetWidth(pix), pixGetHeight(pix));
145 block_it.add_to_end(block);
146 }
◆ ClearParts()
void tesseract::EquationFinderTest::ClearParts |
( |
std::vector< ColPartition * > * |
all_parts | ) |
|
|
inlineprotected |
Definition at line 164 of file equationdetect_test.cc.
164 {
165 for (auto &all_part : *all_parts) {
166 all_part->DeleteBoxes();
167 delete all_part;
168 }
169 }
◆ CreateColParts()
void tesseract::EquationFinderTest::CreateColParts |
( |
const int |
rows, |
|
|
const int |
cols, |
|
|
ColPartitionGrid * |
part_grid, |
|
|
std::vector< ColPartition * > * |
all_parts |
|
) |
| |
|
inlineprotected |
Definition at line 149 of file equationdetect_test.cc.
150 {
151 const int kWidth = 10, kHeight = 10;
153 for (
int y = 0;
y < rows; ++
y) {
154 for (
int x = 0;
x < cols; ++
x) {
155 int left =
x * kWidth * 2, bottom =
y * kHeight * 2;
156 TBOX box(left, bottom, left + kWidth, bottom + kHeight);
158 part_grid->InsertBBox(true, true, part);
159 all_parts->push_back(part);
160 }
161 }
162 }
static ColPartition * FakePartition(const TBOX &box, PolyBlockType block_type, BlobRegionType blob_type, BlobTextFlowType flow)
void ClearParts(std::vector< ColPartition * > *all_parts)
◆ SetUp()
void tesseract::EquationFinderTest::SetUp |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
Reimplemented from testing::Test.
Definition at line 123 of file equationdetect_test.cc.
123 {
124 std::locale::global(std::locale(""));
130
132 }
std::unique_ptr< Tesseract > tesseract_
std::unique_ptr< TestableEquationDetect > equation_det_
std::string testdata_dir_
◆ TearDown()
void tesseract::EquationFinderTest::TearDown |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ equation_det_
◆ tesseract_
std::unique_ptr<Tesseract> tesseract::EquationFinderTest::tesseract_ |
|
protected |
◆ testdata_dir_
std::string tesseract::EquationFinderTest::testdata_dir_ |
|
protected |
The documentation for this class was generated from the following file: