| | |
| | | public: |
| | | void init(); |
| | | void destory(); |
| | | unsigned char** recognition_numbers(unsigned char* data, unsigned char* b_in, const int rows, const int cols, const int num_width, const int num_height, const int num_count); |
| | | |
| | | //分隔每一行需要识别的数字 |
| | | void splitNum(unsigned char* img, int img_width, int img_height, int* pos, int pos_count, unsigned char* zero, int num_width, int num_height, int number_count, unsigned char* result); |
| | | |
| | | //将RGB图片转为灰度图片 |
| | | void rgb2Gray(unsigned char* imgs, int imgWidth, int imgHeight, |
| | | unsigned char* result); |
| | | |
| | | void rgba2Gray(unsigned char* imgs, int imgWidth, int imgHeight, |
| | | unsigned char* result); |
| | | |
| | | //创建识别的数字模板 |
| | | void createNumberTemplates(int lines, int num_width, int num_height, int num_count, uchar* numsOneLevelData, unsigned char* result); |
| | | |
| | | //识别数字 |
| | | unsigned char** recognition_numbers(unsigned char* data, unsigned char* num_templates, const int rows, const int cols, const int num_width, const int num_height, const int num_count); |
| | | |
| | | //分隔每一行需要识别的数字 |
| | | //将连续的数字图片分隔成单个数字的图片,方便识别 |
| | | void splitL2Num(unsigned char* img, int img_width, int img_height, int* pos, int pos_count, unsigned char* zero, int num_width, int num_height, int number_count, unsigned char* result); |
| | | |
| | | |
| | | //分隔行数据 |
| | | void splitRowData(unsigned char* imgs, int imgWidth, int imgHeight, int* rowIndexs, int lines, |
| | | //每一行的数据分隔成7个区域 |
| | | void splitL2RowData(unsigned char* imgs, int imgWidth, int imgHeight, int* rowIndexs, int lines, |
| | | int* result); |
| | | |
| | | void rgb2Gray(unsigned char* imgs, int imgWidth, int imgHeight, |
| | | unsigned char* result); |
| | | |
| | | //识别非数字 |
| | | void recognitionNotNum(unsigned char* imgs, int imgWidth, int imgHeight, int* rowIndexs, int colCount, int lines, |
| | | int* result); |
| | | |
| | | |
| | | }; |
| | | |