#include <ratngs.h>
 | 
|   | BLOB_CHOICE () | 
|   | 
|   | BLOB_CHOICE (UNICHAR_ID src_unichar_id, float src_rating, float src_cert, int script_id, float min_xheight, float max_xheight, float yshift, BlobChoiceClassifier c) | 
|   | 
|   | BLOB_CHOICE (const BLOB_CHOICE &other) | 
|   | 
|   | ~BLOB_CHOICE () | 
|   | 
| UNICHAR_ID  | unichar_id () const | 
|   | 
| float  | rating () const | 
|   | 
| float  | certainty () const | 
|   | 
| inT16  | fontinfo_id () const | 
|   | 
| inT16  | fontinfo_id2 () const | 
|   | 
| const GenericVector< tesseract::ScoredFont > &  | fonts () const | 
|   | 
| void  | set_fonts (const GenericVector< tesseract::ScoredFont > &fonts) | 
|   | 
| int  | script_id () const | 
|   | 
| const MATRIX_COORD &  | matrix_cell () | 
|   | 
| inT16  | xgap_before () const | 
|   | 
| inT16  | xgap_after () const | 
|   | 
| float  | min_xheight () const | 
|   | 
| float  | max_xheight () const | 
|   | 
| float  | yshift () const | 
|   | 
| BlobChoiceClassifier  | classifier () const | 
|   | 
| bool  | IsAdapted () const | 
|   | 
| bool  | IsClassified () const | 
|   | 
| void  | set_unichar_id (UNICHAR_ID newunichar_id) | 
|   | 
| void  | set_rating (float newrat) | 
|   | 
| void  | set_certainty (float newrat) | 
|   | 
| void  | set_script (int newscript_id) | 
|   | 
| void  | set_matrix_cell (int col, int row) | 
|   | 
| void  | set_xgap_before (inT16 gap) | 
|   | 
| void  | set_xgap_after (inT16 gap) | 
|   | 
| void  | set_classifier (BlobChoiceClassifier classifier) | 
|   | 
| bool  | PosAndSizeAgree (const BLOB_CHOICE &other, float x_height, bool debug) const | 
|   | 
| void  | print (const UNICHARSET *unicharset) const | 
|   | 
| void  | print_full () const | 
|   | 
|   | ELIST_LINK () | 
|   | 
|   | ELIST_LINK (const ELIST_LINK &) | 
|   | 
| void  | operator= (const ELIST_LINK &) | 
|   | 
Definition at line 48 of file ratngs.h.
 
◆ BLOB_CHOICE() [1/3]
  
  
      
        
          | BLOB_CHOICE::BLOB_CHOICE  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ BLOB_CHOICE() [2/3]
      
        
          | BLOB_CHOICE::BLOB_CHOICE  | 
          ( | 
          UNICHAR_ID  | 
          src_unichar_id,  | 
        
        
           | 
           | 
          float  | 
          src_rating,  | 
        
        
           | 
           | 
          float  | 
          src_cert,  | 
        
        
           | 
           | 
          int  | 
          src_script_id,  | 
        
        
           | 
           | 
          float  | 
          min_xheight,  | 
        
        
           | 
           | 
          float  | 
          max_xheight,  | 
        
        
           | 
           | 
          float  | 
          yshift,  | 
        
        
           | 
           | 
          BlobChoiceClassifier  | 
          c  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
BLOB_CHOICE::BLOB_CHOICE
Constructor to build a BLOB_CHOICE from a char, rating and certainty. 
Definition at line 90 of file ratngs.cpp.
   98   unichar_id_ = src_unichar_id;
   100   certainty_ = src_cert;
   103   script_id_ = src_script_id;
 
float min_xheight() const
 
float max_xheight() const
 
 
 
 
◆ BLOB_CHOICE() [3/3]
BLOB_CHOICE::BLOB_CHOICE
Constructor to build a BLOB_CHOICE from another BLOB_CHOICE. 
Definition at line 115 of file ratngs.cpp.
  122   matrix_cell_ = other.matrix_cell_;
   123   min_xheight_ = other.min_xheight_;
   124   max_xheight_ = other.max_xheight_;
   126   classifier_ = other.classifier_;
   127   fonts_ = other.fonts_;
 
inT16 fontinfo_id2() const
 
inT16 fontinfo_id() const
 
UNICHAR_ID unichar_id() const
 
 
 
 
◆ ~BLOB_CHOICE()
  
  
      
        
          | BLOB_CHOICE::~BLOB_CHOICE  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ certainty()
  
  
      
        
          | float BLOB_CHOICE::certainty  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ classifier()
◆ deep_copy()
◆ fontinfo_id()
  
  
      
        
          | inT16 BLOB_CHOICE::fontinfo_id  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ fontinfo_id2()
  
  
      
        
          | inT16 BLOB_CHOICE::fontinfo_id2  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ fonts()
◆ IsAdapted()
  
  
      
        
          | bool BLOB_CHOICE::IsAdapted  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ IsClassified()
  
  
      
        
          | bool BLOB_CHOICE::IsClassified  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ matrix_cell()
◆ max_xheight()
  
  
      
        
          | float BLOB_CHOICE::max_xheight  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ min_xheight()
  
  
      
        
          | float BLOB_CHOICE::min_xheight  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ PosAndSizeAgree()
      
        
          | bool BLOB_CHOICE::PosAndSizeAgree  | 
          ( | 
          const BLOB_CHOICE &  | 
          other,  | 
        
        
           | 
           | 
          float  | 
          x_height,  | 
        
        
           | 
           | 
          bool  | 
          debug  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Definition at line 132 of file ratngs.cpp.
  137       tprintf(
"Baseline diff %g for %d v %d\n",
   138               baseline_diff, unichar_id_, other.unichar_id_);
   148   overlap /= denominator;
   150     tprintf(
"PosAndSize for %d v %d: bl diff = %g, ranges %g, %g / %g ->%g\n",
   151             unichar_id_, other.unichar_id_, baseline_diff,
   152             this_range, other_range, denominator, overlap);
 
const double kMaxOverlapDenominator
 
const double kMaxBaselineDrift
 
T ClipToRange(const T &x, const T &lower_bound, const T &upper_bound)
 
const double kMinXHeightMatch
 
float min_xheight() const
 
float max_xheight() const
 
 
 
 
◆ print()
  
  
      
        
          | void BLOB_CHOICE::print  | 
          ( | 
          const UNICHARSET *  | 
          unicharset | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Definition at line 179 of file ratngs.h.
  180       tprintf(
"r%.2f c%.2f x[%g,%g]: %d %s",
   182               min_xheight_, max_xheight_, unichar_id_,
   183               (unicharset == NULL) ? 
"" :
 
const char * string() const
 
STRING debug_str(UNICHAR_ID id) const
 
 
 
 
◆ print_full()
  
  
      
        
          | void BLOB_CHOICE::print_full  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Definition at line 186 of file ratngs.h.
  188       tprintf(
" script=%d, font1=%d, font2=%d, yshift=%g, classifier=%d\n",
   189               script_id_, fontinfo_id_, fontinfo_id2_, yshift_, classifier_);
 
void print(const UNICHARSET *unicharset) const
 
 
 
 
◆ rating()
  
  
      
        
          | float BLOB_CHOICE::rating  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ script_id()
  
  
      
        
          | int BLOB_CHOICE::script_id  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ set_certainty()
  
  
      
        
          | void BLOB_CHOICE::set_certainty  | 
          ( | 
          float  | 
          newrat | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ set_classifier()
Definition at line 166 of file ratngs.h.
BlobChoiceClassifier classifier() const
 
 
 
 
◆ set_fonts()
Definition at line 94 of file ratngs.h.
   96       int score1 = 0, score2 = 0;
    99       for (
int f = 0; f < fonts_.
size(); ++f) {
   100         if (fonts_[f].score > score1) {
   102           fontinfo_id2_ = fontinfo_id_;
   103           score1 = fonts_[f].score;
   104           fontinfo_id_ = fonts_[f].fontinfo_id;
   105         } 
else if (fonts_[f].score > score2) {
   106           score2 = fonts_[f].score;
   107           fontinfo_id2_ = fonts_[f].fontinfo_id;
 const GenericVector< tesseract::ScoredFont > & fonts() const
 
 
 
 
◆ set_matrix_cell()
  
  
      
        
          | void BLOB_CHOICE::set_matrix_cell  | 
          ( | 
          int  | 
          col,  | 
         
        
           | 
           | 
          int  | 
          row  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Definition at line 156 of file ratngs.h.
  157       matrix_cell_.
col = col;
   158       matrix_cell_.
row = row;
 
 
 
 
◆ set_rating()
  
  
      
        
          | void BLOB_CHOICE::set_rating  | 
          ( | 
          float  | 
          newrat | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ set_script()
  
  
      
        
          | void BLOB_CHOICE::set_script  | 
          ( | 
          int  | 
          newscript_id | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 153 of file ratngs.h.
  154       script_id_ = newscript_id;
  
 
 
◆ set_unichar_id()
  
  
      
        
          | void BLOB_CHOICE::set_unichar_id  | 
          ( | 
          UNICHAR_ID  | 
          newunichar_id | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 144 of file ratngs.h.
  145       unichar_id_ = newunichar_id;
  
 
 
◆ set_xgap_after()
  
  
      
        
          | void BLOB_CHOICE::set_xgap_after  | 
          ( | 
          inT16  | 
          gap | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ set_xgap_before()
  
  
      
        
          | void BLOB_CHOICE::set_xgap_before  | 
          ( | 
          inT16  | 
          gap | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ SortByRating()
  
  
      
        
          | static int BLOB_CHOICE::SortByRating  | 
          ( | 
          const void *  | 
          p1,  | 
         
        
           | 
           | 
          const void *  | 
          p2  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Definition at line 192 of file ratngs.h.
  197       return (bc1->rating_ < bc2->rating_) ? -1 : 1;
 
 
 
 
◆ unichar_id()
◆ xgap_after()
  
  
      
        
          | inT16 BLOB_CHOICE::xgap_after  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ xgap_before()
  
  
      
        
          | inT16 BLOB_CHOICE::xgap_before  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ yshift()
  
  
      
        
          | float BLOB_CHOICE::yshift  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
The documentation for this class was generated from the following files:
- /home/stefan/src/github/tesseract-ocr/tesseract/ccstruct/ratngs.h
 
- /home/stefan/src/github/tesseract-ocr/tesseract/ccstruct/ratngs.cpp