types.h

来自「Ocr source code. provides an Ocr engine 」· C头文件 代码 · 共 119 行

H
119
字号
/* 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 + =
减小字号Ctrl + -
显示快捷键?