tesseract 3.04.01

ccstruct/seam.cpp File Reference

#include "seam.h"
#include "blobs.h"
#include "tprintf.h"

Go to the source code of this file.

Functions

start_seam_list

Initialize a list of seams that match the original number of blobs present in the starting segmentation. Each of the seams created by this routine have location information only.

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

Function Documentation

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

Definition at line 269 of file seam.cpp.

                                                                    {
  seam_array->truncate(0);
  TPOINT location;

  for (int b = 1; b < word->NumBlobs(); ++b) {
    TBOX bbox = word->blobs[b - 1]->bounding_box();
    TBOX nbox = word->blobs[b]->bounding_box();
    location.x = (bbox.right() + nbox.left()) / 2;
    location.y = (bbox.bottom() + bbox.top() + nbox.bottom() + nbox.top()) / 4;
    seam_array->push_back(new SEAM(0.0f, location));
  }
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines