tesseract  5.0.0-alpha-619-ge9db
tesseract::BlobGrid Class Reference

#include <blobgrid.h>

Inheritance diagram for tesseract::BlobGrid:
tesseract::BBGrid< BLOBNBOX, BLOBNBOX_CLIST, BLOBNBOX_C_IT > tesseract::GridBase tesseract::AlignedBlob tesseract::CCNonTextDetect tesseract::StrokeWidth tesseract::TabFind tesseract::ColumnFinder

Public Member Functions

 BlobGrid (int gridsize, const ICOORD &bleft, const ICOORD &tright)
 
 ~BlobGrid () override
 
void InsertBlobList (BLOBNBOX_LIST *blobs)
 
- Public Member Functions inherited from tesseract::BBGrid< BLOBNBOX, BLOBNBOX_CLIST, BLOBNBOX_C_IT >
 BBGrid ()
 
 BBGrid (int gridsize, const ICOORD &bleft, const ICOORD &tright)
 
 ~BBGrid () override
 
void Init (int gridsize, const ICOORD &bleft, const ICOORD &tright)
 
void Clear ()
 
void ClearGridData (void(*free_method)(BLOBNBOX *))
 
void InsertBBox (bool h_spread, bool v_spread, BLOBNBOX *bbox)
 
void InsertPixPtBBox (int left, int bottom, Pix *pix, BLOBNBOX *bbox)
 
void RemoveBBox (BLOBNBOX *bbox)
 
bool RectangleEmpty (const TBOX &rect)
 
IntGridCountCellElements ()
 
ScrollViewMakeWindow (int x, int y, const char *window_name)
 
void DisplayBoxes (ScrollView *window)
 
void AssertNoDuplicates ()
 
virtual void HandleClick (int x, int y)
 
- Public Member Functions inherited from tesseract::GridBase
 GridBase ()=default
 
 GridBase (int gridsize, const ICOORD &bleft, const ICOORD &tright)
 
virtual ~GridBase ()
 
void Init (int gridsize, const ICOORD &bleft, const ICOORD &tright)
 
int gridsize () const
 
int gridwidth () const
 
int gridheight () const
 
const ICOORDbleft () const
 
const ICOORDtright () const
 
void GridCoords (int x, int y, int *grid_x, int *grid_y) const
 
void ClipGridCoords (int *x, int *y) const
 

Additional Inherited Members

- Protected Attributes inherited from tesseract::BBGrid< BLOBNBOX, BLOBNBOX_CLIST, BLOBNBOX_C_IT >
BLOBNBOX_CLIST * grid_
 
- Protected Attributes inherited from tesseract::GridBase
int gridsize_
 
int gridwidth_
 
int gridheight_
 
int gridbuckets_
 
ICOORD bleft_
 
ICOORD tright_
 

Detailed Description

Definition at line 33 of file blobgrid.h.

Constructor & Destructor Documentation

◆ BlobGrid()

tesseract::BlobGrid::BlobGrid ( int  gridsize,
const ICOORD bleft,
const ICOORD tright 
)

Definition at line 24 of file blobgrid.cpp.

25  : BBGrid<BLOBNBOX, BLOBNBOX_CLIST, BLOBNBOX_C_IT>(gridsize, bleft, tright) {
26 }

◆ ~BlobGrid()

tesseract::BlobGrid::~BlobGrid ( )
overridedefault

Member Function Documentation

◆ InsertBlobList()

void tesseract::BlobGrid::InsertBlobList ( BLOBNBOX_LIST *  blobs)

Definition at line 36 of file blobgrid.cpp.

36  {
37  BLOBNBOX_IT blob_it(blobs);
38  for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) {
39  BLOBNBOX* blob = blob_it.data();
40  if (!blob->joined_to_prev())
41  InsertBBox(true, true, blob);
42  }
43 }

The documentation for this class was generated from the following files:
tesseract::BBGrid< BLOBNBOX, BLOBNBOX_CLIST, BLOBNBOX_C_IT >::InsertBBox
void InsertBBox(bool h_spread, bool v_spread, BLOBNBOX *bbox)
Definition: bbgrid.h:486
BLOBNBOX
Definition: blobbox.h:142
tesseract::GridBase::tright
const ICOORD & tright() const
Definition: bbgrid.h:75
BLOBNBOX::joined_to_prev
bool joined_to_prev() const
Definition: blobbox.h:255
tesseract::GridBase::gridsize
int gridsize() const
Definition: bbgrid.h:63
tesseract::GridBase::bleft
const ICOORD & bleft() const
Definition: bbgrid.h:72