tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::ColPartition Class Reference

#include <colpartition.h>

Inheritance diagram for tesseract::ColPartition:
Collaboration diagram for tesseract::ColPartition:

Public Member Functions

 ColPartition ()=default
 
 ColPartition (BlobRegionType blob_type, const ICOORD &vertical)
 
 ~ColPartition ()
 
const TBOXbounding_box () const
 
int left_margin () const
 
void set_left_margin (int margin)
 
int right_margin () const
 
void set_right_margin (int margin)
 
int median_top () const
 
int median_bottom () const
 
int median_left () const
 
int median_right () const
 
int median_height () const
 
void set_median_height (int height)
 
int median_width () const
 
void set_median_width (int width)
 
BlobRegionType blob_type () const
 
void set_blob_type (BlobRegionType t)
 
BlobTextFlowType flow () const
 
void set_flow (BlobTextFlowType f)
 
int good_blob_score () const
 
bool good_width () const
 
bool good_column () const
 
bool left_key_tab () const
 
int left_key () const
 
bool right_key_tab () const
 
int right_key () const
 
PolyBlockType type () const
 
void set_type (PolyBlockType t)
 
BLOBNBOX_CLIST * boxes ()
 
int boxes_count () const
 
void set_vertical (const ICOORD &v)
 
ColPartition_CLIST * upper_partners ()
 
ColPartition_CLIST * lower_partners ()
 
void set_working_set (WorkingPartSet *working_set)
 
bool block_owned () const
 
void set_block_owned (bool owned)
 
bool desperately_merged () const
 
ColPartitionSetcolumn_set () const
 
void set_side_step (int step)
 
int bottom_spacing () const
 
void set_bottom_spacing (int spacing)
 
int top_spacing () const
 
void set_top_spacing (int spacing)
 
void set_table_type ()
 
void clear_table_type ()
 
bool inside_table_column ()
 
void set_inside_table_column (bool val)
 
ColPartitionnearest_neighbor_above () const
 
void set_nearest_neighbor_above (ColPartition *part)
 
ColPartitionnearest_neighbor_below () const
 
void set_nearest_neighbor_below (ColPartition *part)
 
int space_above () const
 
void set_space_above (int space)
 
int space_below () const
 
void set_space_below (int space)
 
int space_to_left () const
 
void set_space_to_left (int space)
 
int space_to_right () const
 
void set_space_to_right (int space)
 
uint8_t * color1 ()
 
uint8_t * color2 ()
 
bool owns_blobs () const
 
void set_owns_blobs (bool owns_blobs)
 
int MidY () const
 
int MedianY () const
 
int MidX () const
 
int SortKey (int x, int y) const
 
int XAtY (int sort_key, int y) const
 
int KeyWidth (int left_key, int right_key) const
 
int ColumnWidth () const
 
int BoxLeftKey () const
 
int BoxRightKey () const
 
int LeftAtY (int y) const
 
int RightAtY (int y) const
 
bool IsLeftOf (const ColPartition &other) const
 
bool ColumnContains (int x, int y) const
 
bool IsEmpty () const
 
bool IsSingleton () const
 
bool HOverlaps (const ColPartition &other) const
 
bool VOverlaps (const ColPartition &other) const
 
int VCoreOverlap (const ColPartition &other) const
 
int HCoreOverlap (const ColPartition &other) const
 
bool VSignificantCoreOverlap (const ColPartition &other) const
 
bool WithinSameMargins (const ColPartition &other) const
 
bool TypesMatch (const ColPartition &other) const
 
bool IsLineType () const
 
bool IsImageType () const
 
bool IsTextType () const
 
bool IsPulloutType () const
 
bool IsVerticalType () const
 
bool IsHorizontalType () const
 
bool IsUnMergeableType () const
 
bool IsVerticalLine () const
 
bool IsHorizontalLine () const
 
void AddBox (BLOBNBOX *box)
 
void RemoveBox (BLOBNBOX *box)
 
BLOBNBOXBiggestBox ()
 
TBOX BoundsWithoutBox (BLOBNBOX *box)
 
void ClaimBoxes ()
 
void DisownBoxes ()
 
void DisownBoxesNoAssert ()
 
bool ReleaseNonLeaderBoxes ()
 
void DeleteBoxes ()
 
void ReflectInYAxis ()
 
bool IsLegal ()
 
bool MatchingColumns (const ColPartition &other) const
 
bool MatchingTextColor (const ColPartition &other) const
 
bool MatchingSizes (const ColPartition &other) const
 
bool ConfirmNoTabViolation (const ColPartition &other) const
 
bool MatchingStrokeWidth (const ColPartition &other, double fractional_tolerance, double constant_tolerance) const
 
bool OKDiacriticMerge (const ColPartition &candidate, bool debug) const
 
void SetLeftTab (const TabVector *tab_vector)
 
void SetRightTab (const TabVector *tab_vector)
 
void CopyLeftTab (const ColPartition &src, bool take_box)
 
void CopyRightTab (const ColPartition &src, bool take_box)
 
int LeftBlobRule () const
 
int RightBlobRule () const
 
float SpecialBlobsDensity (const BlobSpecialTextType type) const
 
int SpecialBlobsCount (const BlobSpecialTextType type)
 
void SetSpecialBlobsDensity (const BlobSpecialTextType type, const float density)
 
void ComputeSpecialBlobsDensity ()
 
void AddPartner (bool upper, ColPartition *partner)
 
void RemovePartner (bool upper, ColPartition *partner)
 
ColPartitionSingletonPartner (bool upper)
 
void Absorb (ColPartition *other, WidthCallback *cb)
 
bool OKMergeOverlap (const ColPartition &merge1, const ColPartition &merge2, int ok_box_overlap, bool debug)
 
BLOBNBOXOverlapSplitBlob (const TBOX &box)
 
ColPartitionSplitAtBlob (BLOBNBOX *split_blob)
 
ColPartitionSplitAt (int split_x)
 
void ComputeLimits ()
 
int CountOverlappingBoxes (const TBOX &box)
 
void SetPartitionType (int resolution, ColPartitionSet *columns)
 
PolyBlockType PartitionType (ColumnSpanningType flow) const
 
void ColumnRange (int resolution, ColPartitionSet *columns, int *first_col, int *last_col)
 
void SetColumnGoodness (WidthCallback *cb)
 
bool MarkAsLeaderIfMonospaced ()
 
void SetRegionAndFlowTypesFromProjectionValue (int value)
 
void SetBlobTypes ()
 
bool HasGoodBaseline ()
 
void AddToWorkingSet (const ICOORD &bleft, const ICOORD &tright, int resolution, ColPartition_LIST *used_parts, WorkingPartSet_LIST *working_set)
 
TO_ROWMakeToRow ()
 
ColPartitionShallowCopy () const
 
ColPartitionCopyButDontOwnBlobs ()
 
ScrollView::Color BoxColor () const
 
void Print () const
 
void PrintColors ()
 
void SmoothPartnerRun (int working_set_count)
 
void RefinePartners (PolyBlockType type, bool get_desperate, ColPartitionGrid *grid)
 
bool IsInSameColumnAs (const ColPartition &part) const
 
void set_first_column (int column)
 
void set_last_column (int column)
 

Static Public Member Functions

static ColPartitionMakeLinePartition (BlobRegionType blob_type, const ICOORD &vertical, int left, int bottom, int right, int top)
 
static ColPartitionFakePartition (const TBOX &box, PolyBlockType block_type, BlobRegionType blob_type, BlobTextFlowType flow)
 
static ColPartitionMakeBigPartition (BLOBNBOX *box, ColPartition_LIST *big_part_list)
 
static bool TypesMatch (BlobRegionType type1, BlobRegionType type2)
 
static bool TypesSimilar (PolyBlockType type1, PolyBlockType type2)
 
static void LineSpacingBlocks (const ICOORD &bleft, const ICOORD &tright, int resolution, ColPartition_LIST *block_parts, ColPartition_LIST *used_parts, BLOCK_LIST *completed_blocks, TO_BLOCK_LIST *to_blocks)
 
static TO_BLOCKMakeBlock (const ICOORD &bleft, const ICOORD &tright, ColPartition_LIST *block_parts, ColPartition_LIST *used_parts)
 
static TO_BLOCKMakeVerticalTextBlock (const ICOORD &bleft, const ICOORD &tright, ColPartition_LIST *block_parts, ColPartition_LIST *used_parts)
 
static int SortByBBox (const void *p1, const void *p2)
 

Private Types

enum  SpacingNeighbourhood {
  PN_ABOVE2, PN_ABOVE1, PN_UPPER, PN_LOWER,
  PN_BELOW1, PN_BELOW2, PN_COUNT
}
 

Private Member Functions

void RefinePartnersInternal (bool upper, bool get_desperate, ColPartitionGrid *grid)
 
void RefinePartnersByType (bool upper, ColPartition_CLIST *partners)
 
void RefinePartnerShortcuts (bool upper, ColPartition_CLIST *partners)
 
void RefineTextPartnersByMerge (bool upper, bool desperate, ColPartition_CLIST *partners, ColPartitionGrid *grid)
 
void RefinePartnersByOverlap (bool upper, ColPartition_CLIST *partners)
 
bool ThisPartitionBetter (BLOBNBOX *bbox, const ColPartition &other)
 
bool SpacingEqual (int spacing, int resolution) const
 
bool SpacingsEqual (const ColPartition &other, int resolution) const
 
bool SummedSpacingOK (const ColPartition &other, int spacing, int resolution) const
 
int BottomSpacingMargin (int resolution) const
 
int TopSpacingMargin (int resolution) const
 
bool SizesSimilar (const ColPartition &other) const
 

Static Private Member Functions

static void SmoothSpacings (int resolution, int page_height, ColPartition_LIST *parts)
 
static bool OKSpacingBlip (int resolution, int median_spacing, ColPartition **parts)
 
static void LeftEdgeRun (ColPartition_IT *part_it, ICOORD *start, ICOORD *end)
 
static void RightEdgeRun (ColPartition_IT *part_it, ICOORD *start, ICOORD *end)
 

Private Attributes

int left_margin_
 
int right_margin_
 
TBOX bounding_box_
 
int median_bottom_
 
int median_top_
 
int median_height_
 
int median_left_
 
int median_right_
 
int median_width_
 
BlobRegionType blob_type_
 
BlobTextFlowType flow_
 
int good_blob_score_
 
bool good_width_
 
bool good_column_
 
bool left_key_tab_
 
bool right_key_tab_
 
int left_key_
 
int right_key_
 
PolyBlockType type_
 
BLOBNBOX_CLIST boxes_
 
ICOORD vertical_
 
ColPartition_CLIST upper_partners_
 
ColPartition_CLIST lower_partners_
 
WorkingPartSetworking_set_
 
bool last_add_was_vertical_
 
bool block_owned_
 
bool desperately_merged_
 
int first_column_
 
int last_column_
 
ColPartitionSetcolumn_set_
 
int side_step_
 
int top_spacing_
 
int bottom_spacing_
 
PolyBlockType type_before_table_
 
bool inside_table_column_
 
ColPartitionnearest_neighbor_above_
 
ColPartitionnearest_neighbor_below_
 
int space_above_
 
int space_below_
 
int space_to_left_
 
int space_to_right_
 
uint8_t color1_ [kRGBRMSColors]
 
uint8_t color2_ [kRGBRMSColors]
 
bool owns_blobs_
 
float special_blobs_densities_ [BSTT_COUNT]
 

Detailed Description

ColPartition is a partition of a horizontal slice of the page. It starts out as a collection of blobs at a particular y-coord in the grid, but ends up (after merging and uniquing) as an approximate text line. ColPartitions are also used to hold a partitioning of the page into columns, each representing one column. Although a ColPartition applies to a given y-coordinate range, eventually, a ColPartitionSet of ColPartitions emerges, which represents the columns over a wide y-coordinate range.

Member Enumeration Documentation

◆ SpacingNeighbourhood

Enumerator
PN_ABOVE2 
PN_ABOVE1 
PN_UPPER 
PN_LOWER 
PN_BELOW1 
PN_BELOW2 
PN_COUNT 

Constructor & Destructor Documentation

◆ ColPartition() [1/2]

tesseract::ColPartition::ColPartition ( )
default

◆ ColPartition() [2/2]

tesseract::ColPartition::ColPartition ( BlobRegionType  blob_type,
const ICOORD vertical 
)
Parameters
blob_typeis the blob_region_type_ of the blobs in this partition.
verticalis the direction of logical vertical on the possibly skewed image.

◆ ~ColPartition()

tesseract::ColPartition::~ColPartition ( )

Member Function Documentation

◆ Absorb()

void tesseract::ColPartition::Absorb ( ColPartition other,
WidthCallback cb 
)

◆ AddBox()

void tesseract::ColPartition::AddBox ( BLOBNBOX box)

◆ AddPartner()

void tesseract::ColPartition::AddPartner ( bool  upper,
ColPartition partner 
)

◆ AddToWorkingSet()

void tesseract::ColPartition::AddToWorkingSet ( const ICOORD bleft,
const ICOORD tright,
int  resolution,
ColPartition_LIST *  used_parts,
WorkingPartSet_LIST *  working_set 
)

◆ BiggestBox()

BLOBNBOX * tesseract::ColPartition::BiggestBox ( )

◆ blob_type()

BlobRegionType tesseract::ColPartition::blob_type ( ) const
inline

◆ block_owned()

bool tesseract::ColPartition::block_owned ( ) const
inline

◆ bottom_spacing()

int tesseract::ColPartition::bottom_spacing ( ) const
inline

◆ BottomSpacingMargin()

int tesseract::ColPartition::BottomSpacingMargin ( int  resolution) const
private

◆ bounding_box()

const TBOX& tesseract::ColPartition::bounding_box ( ) const
inline

◆ BoundsWithoutBox()

TBOX tesseract::ColPartition::BoundsWithoutBox ( BLOBNBOX box)

◆ BoxColor()

ScrollView::Color tesseract::ColPartition::BoxColor ( ) const

◆ boxes()

BLOBNBOX_CLIST* tesseract::ColPartition::boxes ( )
inline

◆ boxes_count()

int tesseract::ColPartition::boxes_count ( ) const
inline

◆ BoxLeftKey()

int tesseract::ColPartition::BoxLeftKey ( ) const
inline

◆ BoxRightKey()

int tesseract::ColPartition::BoxRightKey ( ) const
inline

◆ ClaimBoxes()

void tesseract::ColPartition::ClaimBoxes ( )

◆ clear_table_type()

void tesseract::ColPartition::clear_table_type ( )
inline

◆ color1()

uint8_t* tesseract::ColPartition::color1 ( )
inline

◆ color2()

uint8_t* tesseract::ColPartition::color2 ( )
inline

◆ column_set()

ColPartitionSet* tesseract::ColPartition::column_set ( ) const
inline

◆ ColumnContains()

bool tesseract::ColPartition::ColumnContains ( int  x,
int  y 
) const
inline

◆ ColumnRange()

void tesseract::ColPartition::ColumnRange ( int  resolution,
ColPartitionSet columns,
int *  first_col,
int *  last_col 
)

◆ ColumnWidth()

int tesseract::ColPartition::ColumnWidth ( ) const
inline

◆ ComputeLimits()

void tesseract::ColPartition::ComputeLimits ( )

◆ ComputeSpecialBlobsDensity()

void tesseract::ColPartition::ComputeSpecialBlobsDensity ( )

◆ ConfirmNoTabViolation()

bool tesseract::ColPartition::ConfirmNoTabViolation ( const ColPartition other) const

◆ CopyButDontOwnBlobs()

ColPartition * tesseract::ColPartition::CopyButDontOwnBlobs ( )

◆ CopyLeftTab()

void tesseract::ColPartition::CopyLeftTab ( const ColPartition src,
bool  take_box 
)

◆ CopyRightTab()

void tesseract::ColPartition::CopyRightTab ( const ColPartition src,
bool  take_box 
)

◆ CountOverlappingBoxes()

int tesseract::ColPartition::CountOverlappingBoxes ( const TBOX box)

◆ DeleteBoxes()

void tesseract::ColPartition::DeleteBoxes ( )

◆ desperately_merged()

bool tesseract::ColPartition::desperately_merged ( ) const
inline

◆ DisownBoxes()

void tesseract::ColPartition::DisownBoxes ( )

◆ DisownBoxesNoAssert()

void tesseract::ColPartition::DisownBoxesNoAssert ( )

◆ FakePartition()

ColPartition * tesseract::ColPartition::FakePartition ( const TBOX box,
PolyBlockType  block_type,
BlobRegionType  blob_type,
BlobTextFlowType  flow 
)
static

◆ flow()

BlobTextFlowType tesseract::ColPartition::flow ( ) const
inline

◆ good_blob_score()

int tesseract::ColPartition::good_blob_score ( ) const
inline

◆ good_column()

bool tesseract::ColPartition::good_column ( ) const
inline

◆ good_width()

bool tesseract::ColPartition::good_width ( ) const
inline

◆ HasGoodBaseline()

bool tesseract::ColPartition::HasGoodBaseline ( )

◆ HCoreOverlap()

int tesseract::ColPartition::HCoreOverlap ( const ColPartition other) const
inline

◆ HOverlaps()

bool tesseract::ColPartition::HOverlaps ( const ColPartition other) const
inline

◆ inside_table_column()

bool tesseract::ColPartition::inside_table_column ( )
inline

◆ IsEmpty()

bool tesseract::ColPartition::IsEmpty ( ) const
inline

◆ IsHorizontalLine()

bool tesseract::ColPartition::IsHorizontalLine ( ) const
inline

◆ IsHorizontalType()

bool tesseract::ColPartition::IsHorizontalType ( ) const
inline

◆ IsImageType()

bool tesseract::ColPartition::IsImageType ( ) const
inline

◆ IsInSameColumnAs()

bool tesseract::ColPartition::IsInSameColumnAs ( const ColPartition part) const

◆ IsLeftOf()

bool tesseract::ColPartition::IsLeftOf ( const ColPartition other) const
inline

◆ IsLegal()

bool tesseract::ColPartition::IsLegal ( )

◆ IsLineType()

bool tesseract::ColPartition::IsLineType ( ) const
inline

◆ IsPulloutType()

bool tesseract::ColPartition::IsPulloutType ( ) const
inline

◆ IsSingleton()

bool tesseract::ColPartition::IsSingleton ( ) const
inline

◆ IsTextType()

bool tesseract::ColPartition::IsTextType ( ) const
inline

◆ IsUnMergeableType()

bool tesseract::ColPartition::IsUnMergeableType ( ) const
inline

◆ IsVerticalLine()

bool tesseract::ColPartition::IsVerticalLine ( ) const
inline

◆ IsVerticalType()

bool tesseract::ColPartition::IsVerticalType ( ) const
inline

◆ KeyWidth()

int tesseract::ColPartition::KeyWidth ( int  left_key,
int  right_key 
) const
inline

◆ left_key()

int tesseract::ColPartition::left_key ( ) const
inline

◆ left_key_tab()

bool tesseract::ColPartition::left_key_tab ( ) const
inline

◆ left_margin()

int tesseract::ColPartition::left_margin ( ) const
inline

◆ LeftAtY()

int tesseract::ColPartition::LeftAtY ( int  y) const
inline

◆ LeftBlobRule()

int tesseract::ColPartition::LeftBlobRule ( ) const

◆ LeftEdgeRun()

void tesseract::ColPartition::LeftEdgeRun ( ColPartition_IT *  part_it,
ICOORD start,
ICOORD end 
)
staticprivate

◆ LineSpacingBlocks()

void tesseract::ColPartition::LineSpacingBlocks ( const ICOORD bleft,
const ICOORD tright,
int  resolution,
ColPartition_LIST *  block_parts,
ColPartition_LIST *  used_parts,
BLOCK_LIST *  completed_blocks,
TO_BLOCK_LIST *  to_blocks 
)
static

◆ lower_partners()

ColPartition_CLIST* tesseract::ColPartition::lower_partners ( )
inline

◆ MakeBigPartition()

ColPartition * tesseract::ColPartition::MakeBigPartition ( BLOBNBOX box,
ColPartition_LIST *  big_part_list 
)
static

◆ MakeBlock()

TO_BLOCK * tesseract::ColPartition::MakeBlock ( const ICOORD bleft,
const ICOORD tright,
ColPartition_LIST *  block_parts,
ColPartition_LIST *  used_parts 
)
static

◆ MakeLinePartition()

ColPartition * tesseract::ColPartition::MakeLinePartition ( BlobRegionType  blob_type,
const ICOORD vertical,
int  left,
int  bottom,
int  right,
int  top 
)
static

Constructs a fake ColPartition with no BLOBNBOXes to represent a horizontal or vertical line, given a type and a bounding box.

◆ MakeToRow()

TO_ROW * tesseract::ColPartition::MakeToRow ( )

◆ MakeVerticalTextBlock()

TO_BLOCK * tesseract::ColPartition::MakeVerticalTextBlock ( const ICOORD bleft,
const ICOORD tright,
ColPartition_LIST *  block_parts,
ColPartition_LIST *  used_parts 
)
static

◆ MarkAsLeaderIfMonospaced()

bool tesseract::ColPartition::MarkAsLeaderIfMonospaced ( )

◆ MatchingColumns()

bool tesseract::ColPartition::MatchingColumns ( const ColPartition other) const

◆ MatchingSizes()

bool tesseract::ColPartition::MatchingSizes ( const ColPartition other) const

◆ MatchingStrokeWidth()

bool tesseract::ColPartition::MatchingStrokeWidth ( const ColPartition other,
double  fractional_tolerance,
double  constant_tolerance 
) const

◆ MatchingTextColor()

bool tesseract::ColPartition::MatchingTextColor ( const ColPartition other) const

◆ median_bottom()

int tesseract::ColPartition::median_bottom ( ) const
inline

◆ median_height()

int tesseract::ColPartition::median_height ( ) const
inline

◆ median_left()

int tesseract::ColPartition::median_left ( ) const
inline

◆ median_right()

int tesseract::ColPartition::median_right ( ) const
inline

◆ median_top()

int tesseract::ColPartition::median_top ( ) const
inline

◆ median_width()

int tesseract::ColPartition::median_width ( ) const
inline

◆ MedianY()

int tesseract::ColPartition::MedianY ( ) const
inline

◆ MidX()

int tesseract::ColPartition::MidX ( ) const
inline

◆ MidY()

int tesseract::ColPartition::MidY ( ) const
inline

◆ nearest_neighbor_above()

ColPartition* tesseract::ColPartition::nearest_neighbor_above ( ) const
inline

◆ nearest_neighbor_below()

ColPartition* tesseract::ColPartition::nearest_neighbor_below ( ) const
inline

◆ OKDiacriticMerge()

bool tesseract::ColPartition::OKDiacriticMerge ( const ColPartition candidate,
bool  debug 
) const

◆ OKMergeOverlap()

bool tesseract::ColPartition::OKMergeOverlap ( const ColPartition merge1,
const ColPartition merge2,
int  ok_box_overlap,
bool  debug 
)

◆ OKSpacingBlip()

bool tesseract::ColPartition::OKSpacingBlip ( int  resolution,
int  median_spacing,
ColPartition **  parts 
)
staticprivate

◆ OverlapSplitBlob()

BLOBNBOX * tesseract::ColPartition::OverlapSplitBlob ( const TBOX box)

◆ owns_blobs()

bool tesseract::ColPartition::owns_blobs ( ) const
inline

◆ PartitionType()

PolyBlockType tesseract::ColPartition::PartitionType ( ColumnSpanningType  flow) const

◆ Print()

void tesseract::ColPartition::Print ( ) const

◆ PrintColors()

void tesseract::ColPartition::PrintColors ( )

◆ RefinePartners()

void tesseract::ColPartition::RefinePartners ( PolyBlockType  type,
bool  get_desperate,
ColPartitionGrid grid 
)

◆ RefinePartnersByOverlap()

void tesseract::ColPartition::RefinePartnersByOverlap ( bool  upper,
ColPartition_CLIST *  partners 
)
private

◆ RefinePartnersByType()

void tesseract::ColPartition::RefinePartnersByType ( bool  upper,
ColPartition_CLIST *  partners 
)
private

◆ RefinePartnerShortcuts()

void tesseract::ColPartition::RefinePartnerShortcuts ( bool  upper,
ColPartition_CLIST *  partners 
)
private

◆ RefinePartnersInternal()

void tesseract::ColPartition::RefinePartnersInternal ( bool  upper,
bool  get_desperate,
ColPartitionGrid grid 
)
private

◆ RefineTextPartnersByMerge()

void tesseract::ColPartition::RefineTextPartnersByMerge ( bool  upper,
bool  desperate,
ColPartition_CLIST *  partners,
ColPartitionGrid grid 
)
private

◆ ReflectInYAxis()

void tesseract::ColPartition::ReflectInYAxis ( )

◆ ReleaseNonLeaderBoxes()

bool tesseract::ColPartition::ReleaseNonLeaderBoxes ( )

◆ RemoveBox()

void tesseract::ColPartition::RemoveBox ( BLOBNBOX box)

◆ RemovePartner()

void tesseract::ColPartition::RemovePartner ( bool  upper,
ColPartition partner 
)

◆ right_key()

int tesseract::ColPartition::right_key ( ) const
inline

◆ right_key_tab()

bool tesseract::ColPartition::right_key_tab ( ) const
inline

◆ right_margin()

int tesseract::ColPartition::right_margin ( ) const
inline

◆ RightAtY()

int tesseract::ColPartition::RightAtY ( int  y) const
inline

◆ RightBlobRule()

int tesseract::ColPartition::RightBlobRule ( ) const

◆ RightEdgeRun()

void tesseract::ColPartition::RightEdgeRun ( ColPartition_IT *  part_it,
ICOORD start,
ICOORD end 
)
staticprivate

◆ set_blob_type()

void tesseract::ColPartition::set_blob_type ( BlobRegionType  t)
inline

◆ set_block_owned()

void tesseract::ColPartition::set_block_owned ( bool  owned)
inline

◆ set_bottom_spacing()

void tesseract::ColPartition::set_bottom_spacing ( int  spacing)
inline

◆ set_first_column()

void tesseract::ColPartition::set_first_column ( int  column)
inline

◆ set_flow()

void tesseract::ColPartition::set_flow ( BlobTextFlowType  f)
inline

◆ set_inside_table_column()

void tesseract::ColPartition::set_inside_table_column ( bool  val)
inline

◆ set_last_column()

void tesseract::ColPartition::set_last_column ( int  column)
inline

◆ set_left_margin()

void tesseract::ColPartition::set_left_margin ( int  margin)
inline

◆ set_median_height()

void tesseract::ColPartition::set_median_height ( int  height)
inline

◆ set_median_width()

void tesseract::ColPartition::set_median_width ( int  width)
inline

◆ set_nearest_neighbor_above()

void tesseract::ColPartition::set_nearest_neighbor_above ( ColPartition part)
inline

◆ set_nearest_neighbor_below()

void tesseract::ColPartition::set_nearest_neighbor_below ( ColPartition part)
inline

◆ set_owns_blobs()

void tesseract::ColPartition::set_owns_blobs ( bool  owns_blobs)
inline

◆ set_right_margin()

void tesseract::ColPartition::set_right_margin ( int  margin)
inline

◆ set_side_step()

void tesseract::ColPartition::set_side_step ( int  step)
inline

◆ set_space_above()

void tesseract::ColPartition::set_space_above ( int  space)
inline

◆ set_space_below()

void tesseract::ColPartition::set_space_below ( int  space)
inline

◆ set_space_to_left()

void tesseract::ColPartition::set_space_to_left ( int  space)
inline

◆ set_space_to_right()

void tesseract::ColPartition::set_space_to_right ( int  space)
inline

◆ set_table_type()

void tesseract::ColPartition::set_table_type ( )
inline

◆ set_top_spacing()

void tesseract::ColPartition::set_top_spacing ( int  spacing)
inline

◆ set_type()

void tesseract::ColPartition::set_type ( PolyBlockType  t)
inline

◆ set_vertical()

void tesseract::ColPartition::set_vertical ( const ICOORD v)
inline

◆ set_working_set()

void tesseract::ColPartition::set_working_set ( WorkingPartSet working_set)
inline

◆ SetBlobTypes()

void tesseract::ColPartition::SetBlobTypes ( )

◆ SetColumnGoodness()

void tesseract::ColPartition::SetColumnGoodness ( WidthCallback cb)

◆ SetLeftTab()

void tesseract::ColPartition::SetLeftTab ( const TabVector tab_vector)

◆ SetPartitionType()

void tesseract::ColPartition::SetPartitionType ( int  resolution,
ColPartitionSet columns 
)

◆ SetRegionAndFlowTypesFromProjectionValue()

void tesseract::ColPartition::SetRegionAndFlowTypesFromProjectionValue ( int  value)

◆ SetRightTab()

void tesseract::ColPartition::SetRightTab ( const TabVector tab_vector)

◆ SetSpecialBlobsDensity()

void tesseract::ColPartition::SetSpecialBlobsDensity ( const BlobSpecialTextType  type,
const float  density 
)

◆ ShallowCopy()

ColPartition * tesseract::ColPartition::ShallowCopy ( ) const

◆ SingletonPartner()

ColPartition * tesseract::ColPartition::SingletonPartner ( bool  upper)

◆ SizesSimilar()

bool tesseract::ColPartition::SizesSimilar ( const ColPartition other) const
private

◆ SmoothPartnerRun()

void tesseract::ColPartition::SmoothPartnerRun ( int  working_set_count)

◆ SmoothSpacings()

void tesseract::ColPartition::SmoothSpacings ( int  resolution,
int  page_height,
ColPartition_LIST *  parts 
)
staticprivate

◆ SortByBBox()

static int tesseract::ColPartition::SortByBBox ( const void *  p1,
const void *  p2 
)
inlinestatic

◆ SortKey()

int tesseract::ColPartition::SortKey ( int  x,
int  y 
) const
inline

◆ space_above()

int tesseract::ColPartition::space_above ( ) const
inline

◆ space_below()

int tesseract::ColPartition::space_below ( ) const
inline

◆ space_to_left()

int tesseract::ColPartition::space_to_left ( ) const
inline

◆ space_to_right()

int tesseract::ColPartition::space_to_right ( ) const
inline

◆ SpacingEqual()

bool tesseract::ColPartition::SpacingEqual ( int  spacing,
int  resolution 
) const
private

◆ SpacingsEqual()

bool tesseract::ColPartition::SpacingsEqual ( const ColPartition other,
int  resolution 
) const
private

◆ SpecialBlobsCount()

int tesseract::ColPartition::SpecialBlobsCount ( const BlobSpecialTextType  type)

◆ SpecialBlobsDensity()

float tesseract::ColPartition::SpecialBlobsDensity ( const BlobSpecialTextType  type) const

◆ SplitAt()

ColPartition * tesseract::ColPartition::SplitAt ( int  split_x)

◆ SplitAtBlob()

ColPartition * tesseract::ColPartition::SplitAtBlob ( BLOBNBOX split_blob)

◆ SummedSpacingOK()

bool tesseract::ColPartition::SummedSpacingOK ( const ColPartition other,
int  spacing,
int  resolution 
) const
private

◆ ThisPartitionBetter()

bool tesseract::ColPartition::ThisPartitionBetter ( BLOBNBOX bbox,
const ColPartition other 
)
private

◆ top_spacing()

int tesseract::ColPartition::top_spacing ( ) const
inline

◆ TopSpacingMargin()

int tesseract::ColPartition::TopSpacingMargin ( int  resolution) const
private

◆ type()

PolyBlockType tesseract::ColPartition::type ( ) const
inline

◆ TypesMatch() [1/2]

bool tesseract::ColPartition::TypesMatch ( const ColPartition other) const
inline

◆ TypesMatch() [2/2]

static bool tesseract::ColPartition::TypesMatch ( BlobRegionType  type1,
BlobRegionType  type2 
)
inlinestatic

◆ TypesSimilar()

static bool tesseract::ColPartition::TypesSimilar ( PolyBlockType  type1,
PolyBlockType  type2 
)
inlinestatic

◆ upper_partners()

ColPartition_CLIST* tesseract::ColPartition::upper_partners ( )
inline

◆ VCoreOverlap()

int tesseract::ColPartition::VCoreOverlap ( const ColPartition other) const
inline

◆ VOverlaps()

bool tesseract::ColPartition::VOverlaps ( const ColPartition other) const
inline

◆ VSignificantCoreOverlap()

bool tesseract::ColPartition::VSignificantCoreOverlap ( const ColPartition other) const
inline

◆ WithinSameMargins()

bool tesseract::ColPartition::WithinSameMargins ( const ColPartition other) const
inline

◆ XAtY()

int tesseract::ColPartition::XAtY ( int  sort_key,
int  y 
) const
inline

Member Data Documentation

◆ blob_type_

BlobRegionType tesseract::ColPartition::blob_type_
private

◆ block_owned_

bool tesseract::ColPartition::block_owned_
private

◆ bottom_spacing_

int tesseract::ColPartition::bottom_spacing_
private

◆ bounding_box_

TBOX tesseract::ColPartition::bounding_box_
private

◆ boxes_

BLOBNBOX_CLIST tesseract::ColPartition::boxes_
private

◆ color1_

uint8_t tesseract::ColPartition::color1_[kRGBRMSColors]
private

◆ color2_

uint8_t tesseract::ColPartition::color2_[kRGBRMSColors]
private

◆ column_set_

ColPartitionSet* tesseract::ColPartition::column_set_
private

◆ desperately_merged_

bool tesseract::ColPartition::desperately_merged_
private

◆ first_column_

int tesseract::ColPartition::first_column_
private

◆ flow_

BlobTextFlowType tesseract::ColPartition::flow_
private

◆ good_blob_score_

int tesseract::ColPartition::good_blob_score_
private

◆ good_column_

bool tesseract::ColPartition::good_column_
private

◆ good_width_

bool tesseract::ColPartition::good_width_
private

◆ inside_table_column_

bool tesseract::ColPartition::inside_table_column_
private

◆ last_add_was_vertical_

bool tesseract::ColPartition::last_add_was_vertical_
private

◆ last_column_

int tesseract::ColPartition::last_column_
private

◆ left_key_

int tesseract::ColPartition::left_key_
private

◆ left_key_tab_

bool tesseract::ColPartition::left_key_tab_
private

◆ left_margin_

int tesseract::ColPartition::left_margin_
private

◆ lower_partners_

ColPartition_CLIST tesseract::ColPartition::lower_partners_
private

◆ median_bottom_

int tesseract::ColPartition::median_bottom_
private

◆ median_height_

int tesseract::ColPartition::median_height_
private

◆ median_left_

int tesseract::ColPartition::median_left_
private

◆ median_right_

int tesseract::ColPartition::median_right_
private

◆ median_top_

int tesseract::ColPartition::median_top_
private

◆ median_width_

int tesseract::ColPartition::median_width_
private

◆ nearest_neighbor_above_

ColPartition* tesseract::ColPartition::nearest_neighbor_above_
private

◆ nearest_neighbor_below_

ColPartition* tesseract::ColPartition::nearest_neighbor_below_
private

◆ owns_blobs_

bool tesseract::ColPartition::owns_blobs_
private

◆ right_key_

int tesseract::ColPartition::right_key_
private

◆ right_key_tab_

bool tesseract::ColPartition::right_key_tab_
private

◆ right_margin_

int tesseract::ColPartition::right_margin_
private

◆ side_step_

int tesseract::ColPartition::side_step_
private

◆ space_above_

int tesseract::ColPartition::space_above_
private

◆ space_below_

int tesseract::ColPartition::space_below_
private

◆ space_to_left_

int tesseract::ColPartition::space_to_left_
private

◆ space_to_right_

int tesseract::ColPartition::space_to_right_
private

◆ special_blobs_densities_

float tesseract::ColPartition::special_blobs_densities_[BSTT_COUNT]
private

◆ top_spacing_

int tesseract::ColPartition::top_spacing_
private

◆ type_

PolyBlockType tesseract::ColPartition::type_
private

◆ type_before_table_

PolyBlockType tesseract::ColPartition::type_before_table_
private

◆ upper_partners_

ColPartition_CLIST tesseract::ColPartition::upper_partners_
private

◆ vertical_

ICOORD tesseract::ColPartition::vertical_
private

◆ working_set_

WorkingPartSet* tesseract::ColPartition::working_set_
private

The documentation for this class was generated from the following files: