tesseract v5.3.3.20231005
tesseract::TEMP_CONFIG_STRUCT Struct Reference

#include <adaptive.h>

Public Member Functions

 TEMP_CONFIG_STRUCT ()=default
 
 TEMP_CONFIG_STRUCT (int MaxProtoId, int FontinfoId)
 
 ~TEMP_CONFIG_STRUCT ()
 

Public Attributes

uint8_t NumTimesSeen
 
uint8_t ProtoVectorSize
 
PROTO_ID MaxProtoId
 
BIT_VECTOR Protos
 
int FontinfoId
 

Detailed Description

Definition at line 32 of file adaptive.h.

Constructor & Destructor Documentation

◆ TEMP_CONFIG_STRUCT() [1/2]

tesseract::TEMP_CONFIG_STRUCT::TEMP_CONFIG_STRUCT ( )
default

◆ TEMP_CONFIG_STRUCT() [2/2]

tesseract::TEMP_CONFIG_STRUCT::TEMP_CONFIG_STRUCT ( int  maxProtoId,
int  fontinfoId 
)

This constructor allocates and returns a new temporary config.

Parameters
MaxProtoIdmax id of any proto in new config
FontinfoIdfont information from pre-trained templates

Definition at line 127 of file adaptive.cpp.

127 {
128 int NumProtos = maxProtoId + 1;
129
130 Protos = NewBitVector(NumProtos);
131
132 NumTimesSeen = 1;
133 MaxProtoId = maxProtoId;
134 ProtoVectorSize = WordsInVectorOfSize(NumProtos);
135 zero_all_bits(Protos, ProtoVectorSize);
136 FontinfoId = fontinfoId;
137}

◆ ~TEMP_CONFIG_STRUCT()

tesseract::TEMP_CONFIG_STRUCT::~TEMP_CONFIG_STRUCT ( )

Definition at line 139 of file adaptive.cpp.

139 {
140 FreeBitVector(Protos);
141}

Member Data Documentation

◆ FontinfoId

int tesseract::TEMP_CONFIG_STRUCT::FontinfoId

Definition at line 40 of file adaptive.h.

◆ MaxProtoId

PROTO_ID tesseract::TEMP_CONFIG_STRUCT::MaxProtoId

Definition at line 38 of file adaptive.h.

◆ NumTimesSeen

uint8_t tesseract::TEMP_CONFIG_STRUCT::NumTimesSeen

Definition at line 36 of file adaptive.h.

◆ Protos

BIT_VECTOR tesseract::TEMP_CONFIG_STRUCT::Protos

Definition at line 39 of file adaptive.h.

◆ ProtoVectorSize

uint8_t tesseract::TEMP_CONFIG_STRUCT::ProtoVectorSize

Definition at line 37 of file adaptive.h.


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