tesseract  4.0.0-1-g2a2b
seam.h File Reference
#include "blobs.h"
#include "split.h"

Go to the source code of this file.

Classes

class  SEAM
 

Typedefs

using PRIORITY = float
 

Functions

void start_seam_list (TWERD *word, GenericVector< SEAM *> *seam_array)
 

Typedef Documentation

◆ PRIORITY

using PRIORITY = float

Definition at line 42 of file seam.h.

Function Documentation

◆ start_seam_list()

void start_seam_list ( TWERD word,
GenericVector< SEAM *> *  seam_array 
)

Definition at line 269 of file seam.cpp.

269  {
270  seam_array->truncate(0);
271  TPOINT location;
272 
273  for (int b = 1; b < word->NumBlobs(); ++b) {
274  TBOX bbox = word->blobs[b - 1]->bounding_box();
275  TBOX nbox = word->blobs[b]->bounding_box();
276  location.x = (bbox.right() + nbox.left()) / 2;
277  location.y = (bbox.bottom() + bbox.top() + nbox.bottom() + nbox.top()) / 4;
278  seam_array->push_back(new SEAM(0.0f, location));
279  }
280 }
Definition: seam.h:44
Definition: rect.h:34
int NumBlobs() const
Definition: blobs.h:432
int16_t left() const
Definition: rect.h:72
int16_t top() const
Definition: rect.h:58
int push_back(T object)
GenericVector< TBLOB * > blobs
Definition: blobs.h:443
int16_t x
Definition: blobs.h:78
int16_t right() const
Definition: rect.h:79
void truncate(int size)
Definition: blobs.h:57
int16_t y
Definition: blobs.h:79
int16_t bottom() const
Definition: rect.h:65