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

Method FindPartitionPartners

deps/tesseract/textord/colpartitiongrid.cpp:1228–1241  ·  view source on GitHub ↗

For every ColPartition in the grid, finds its upper and lower neighbours.

Source from the content-addressed store, hash-verified

1226
1227// For every ColPartition in the grid, finds its upper and lower neighbours.
1228void ColPartitionGrid::FindPartitionPartners() {
1229 ColPartitionGridSearch gsearch(this);
1230 gsearch.StartFullSearch();
1231 ColPartition* part;
1232 while ((part = gsearch.NextFullSearch()) != NULL) {
1233 if (part->IsVerticalType()) {
1234 FindVPartitionPartners(true, part);
1235 FindVPartitionPartners(false, part);
1236 } else {
1237 FindPartitionPartners(true, part);
1238 FindPartitionPartners(false, part);
1239 }
1240 }
1241}
1242
1243// Finds the best partner in the given direction for the given partition.
1244// Stores the result with AddPartner.

Callers 2

FindBlocksMethod · 0.80
InsertCleanPartitionsMethod · 0.80

Calls 14

StartFullSearchMethod · 0.80
NextFullSearchMethod · 0.80
IsVerticalTypeMethod · 0.80
median_topMethod · 0.80
median_bottomMethod · 0.80
StartVerticalSearchMethod · 0.80
MidYMethod · 0.80
NextVerticalSearchMethod · 0.80
HOverlapsMethod · 0.80
WithinSameMarginsMethod · 0.80
TypesMatchMethod · 0.80
typeMethod · 0.45

Tested by

no test coverage detected