tesseract v5.3.3.20231005
tesseract::ADAPT_RESULTS Struct Reference

Public Member Functions

void Initialize ()
 
void ComputeBest ()
 

Public Attributes

int32_t BlobLength
 
bool HasNonfragment
 
UNICHAR_ID best_unichar_id
 
int best_match_index
 
float best_rating
 
std::vector< UnicharRatingmatch
 
std::vector< CP_RESULT_STRUCTCPResults
 

Detailed Description

Definition at line 93 of file adaptmatch.cpp.

Member Function Documentation

◆ ComputeBest()

void tesseract::ADAPT_RESULTS::ComputeBest ( )
inline

Definition at line 110 of file adaptmatch.cpp.

110 {
111 best_unichar_id = INVALID_UNICHAR_ID;
112 best_match_index = -1;
114 for (unsigned i = 0; i < match.size(); ++i) {
115 if (match[i].rating > best_rating) {
116 best_rating = match[i].rating;
117 best_unichar_id = match[i].unichar_id;
119 }
120 }
121 }
#define WORST_POSSIBLE_RATING
Definition: adaptmatch.cpp:91
std::vector< UnicharRating > match
Definition: adaptmatch.cpp:99

◆ Initialize()

void tesseract::ADAPT_RESULTS::Initialize ( )
inline

Initializes data members to the default values. Sets the initial rating of each class to be the worst possible rating (1.0).

Definition at line 104 of file adaptmatch.cpp.

104 {
105 BlobLength = INT32_MAX;
106 HasNonfragment = false;
107 ComputeBest();
108 }

Member Data Documentation

◆ best_match_index

int tesseract::ADAPT_RESULTS::best_match_index

Definition at line 97 of file adaptmatch.cpp.

◆ best_rating

float tesseract::ADAPT_RESULTS::best_rating

Definition at line 98 of file adaptmatch.cpp.

◆ best_unichar_id

UNICHAR_ID tesseract::ADAPT_RESULTS::best_unichar_id

Definition at line 96 of file adaptmatch.cpp.

◆ BlobLength

int32_t tesseract::ADAPT_RESULTS::BlobLength

Definition at line 94 of file adaptmatch.cpp.

◆ CPResults

std::vector<CP_RESULT_STRUCT> tesseract::ADAPT_RESULTS::CPResults

Definition at line 100 of file adaptmatch.cpp.

◆ HasNonfragment

bool tesseract::ADAPT_RESULTS::HasNonfragment

Definition at line 95 of file adaptmatch.cpp.

◆ match

std::vector<UnicharRating> tesseract::ADAPT_RESULTS::match

Definition at line 99 of file adaptmatch.cpp.


The documentation for this struct was generated from the following file: