⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 types.h

📁 Ocr source code. provides an Ocr engine that works in C++ language.
💻 H
字号:
/* types.h : various types used by the program * Author: Maxie D. Schmidt (created 5/20/2006) */#ifndef _TYPES_H_#define _TYPES_H_#include <string>#include <vector>using namespace std;typedef struct {     int x, y;} xy_point;xy_point NULL_POINT();typedef struct {     xy_point xy;     int horiz_len, vert_len;} box_t;box_t NULL_BOX();typedef struct {     xy_point r_most, l_most, t_most, b_most;} box_points;box_points NULL_PTS();enum direction_t {NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST,                   NORTHWEST};enum program_mode_t {NORMAL, TRAINING};typedef vector< vector<bool> > grid_t;typedef vector< vector<int> > grid_int_t;typedef struct {     int lower, upper;} int_interval_t;typedef struct {     int Rl, Gl, Bl;     int Ru, Gu, Bu;} rgb_interval_t;class parse_list;class parsed_line;class parsed_char;typedef struct {     string character;     double probability;} char_probability;typedef struct {     parsed_line *pl;     parsed_char *pc;} plist_parsed_char;typedef struct {     string character;     int num_instances;} profile_sort_token;typedef struct {     int line_num;     string text;} translated_line;class profile;class png_file {     public:          png_file();          ~png_file();          // returns whether the pixel is black / within interval (true),           // or other (false):          bool grid(int row, int col);          void mark(int row, int col);          bool is_marked(int row, int col);          void cleanup_tracks();                    bool is_valid;          string filename;          int width, height;          int scan_starting_line_num;          unsigned char *buf;          unsigned char *tracks;          int tracks_num_bytes;          // parsed file:          bool parsed;          parse_list *plist;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -