tesseract v5.3.3.20231005
|
#include <imagedata.h>
Public Member Functions | |
ImageData () | |
ImageData (bool vertical, Image pix) | |
~ImageData () | |
bool | Serialize (TFile *fp) const |
bool | DeSerialize (TFile *fp) |
const std::string & | imagefilename () const |
void | set_imagefilename (const std::string &name) |
int | page_number () const |
void | set_page_number (int num) |
const std::vector< char > & | image_data () const |
const std::string & | language () const |
void | set_language (const std::string &lang) |
const std::string & | transcription () const |
const std::vector< TBOX > & | boxes () const |
const std::vector< std::string > & | box_texts () const |
const std::string & | box_text (int index) const |
void | SetPix (Image pix) |
Image | GetPix () const |
Image | PreScale (int target_height, int max_height, float *scale_factor, int *scaled_width, int *scaled_height, std::vector< TBOX > *boxes) const |
int | MemoryUsed () const |
void | Display () const |
void | AddBoxes (const std::vector< TBOX > &boxes, const std::vector< std::string > &texts, const std::vector< int > &box_pages) |
Static Public Member Functions | |
static ImageData * | Build (const char *name, int page_number, const char *lang, const char *imagedata, int imagedatasize, const char *truth_text, const char *box_text) |
static bool | SkipDeSerialize (TFile *fp) |
Definition at line 62 of file imagedata.h.
tesseract::ImageData::ImageData | ( | ) |
Definition at line 44 of file imagedata.cpp.
tesseract::ImageData::ImageData | ( | bool | vertical, |
Image | pix | ||
) |
Definition at line 46 of file imagedata.cpp.
tesseract::ImageData::~ImageData | ( | ) |
Definition at line 50 of file imagedata.cpp.
void tesseract::ImageData::AddBoxes | ( | const std::vector< TBOX > & | boxes, |
const std::vector< std::string > & | texts, | ||
const std::vector< int > & | box_pages | ||
) |
Definition at line 315 of file imagedata.cpp.
|
inline |
Definition at line 113 of file imagedata.h.
|
inline |
Definition at line 110 of file imagedata.h.
|
inline |
Definition at line 107 of file imagedata.h.
|
static |
Definition at line 58 of file imagedata.cpp.
bool tesseract::ImageData::DeSerialize | ( | TFile * | fp | ) |
Definition at line 117 of file imagedata.cpp.
void tesseract::ImageData::Display | ( | ) | const |
Definition at line 275 of file imagedata.cpp.
Image tesseract::ImageData::GetPix | ( | ) | const |
Definition at line 193 of file imagedata.cpp.
|
inline |
Definition at line 95 of file imagedata.h.
|
inline |
Definition at line 83 of file imagedata.h.
|
inline |
Definition at line 98 of file imagedata.h.
int tesseract::ImageData::MemoryUsed | ( | ) | const |
Definition at line 268 of file imagedata.cpp.
|
inline |
Definition at line 89 of file imagedata.h.
Image tesseract::ImageData::PreScale | ( | int | target_height, |
int | max_height, | ||
float * | scale_factor, | ||
int * | scaled_width, | ||
int * | scaled_height, | ||
std::vector< TBOX > * | boxes | ||
) | const |
Definition at line 215 of file imagedata.cpp.
bool tesseract::ImageData::Serialize | ( | TFile * | fp | ) | const |
Definition at line 90 of file imagedata.cpp.
|
inline |
Definition at line 86 of file imagedata.h.
|
inline |
Definition at line 101 of file imagedata.h.
|
inline |
Definition at line 92 of file imagedata.h.
void tesseract::ImageData::SetPix | ( | Image | pix | ) |
Definition at line 184 of file imagedata.cpp.
|
static |
Definition at line 148 of file imagedata.cpp.
|
inline |
Definition at line 104 of file imagedata.h.