游戏辅助基础06:易语言大漠识字操作

### 1.制作大漠的字库 大漠识字的流程 制作字库,使用字库的点阵特征码来配匹图片里面的像素 1.创建一个字库文件 ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625920966218793.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 2.寻找图片中的偏色 找字最好是单色,多色需要使用偏色计算器来计算 ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625921054583619.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 3.设置分离字符的点阵 在每一行或列中,只要有一个点阵距离,API默认分离开这个字符 ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625921152836178.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 4.提取图片中的点阵识别 ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625921296471316.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 5.字库文本 官方推荐一个字库不要大于100个识别的字符组,这样效率高,最高支持100个字库文件 ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625921475785042.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 6.加密字库 ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625922980943267.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) --- ### 2.识字 识字包括了字库、找字、识字等一序列功能 #### 2.1 字库API 1.AddDict ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625921820790433.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 2.EnableShareDict ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625921858632910.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 3.ClearDict ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625921889547012.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 4.SetDict ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625921940117024.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 5.UseDict ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625921979813775.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 6.相关API ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625922019866465.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625922032601165.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625922091938892.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) #### 2.2找字API 1.FindStr ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625922576510996.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 2.相关API ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625922630753804.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) #### 2.3识字API 1.Ocr ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625922895386745.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 2.相关API ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625922920792850.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) --- ### 3.易语言代码示例 ![image.png](http://www.icode9.com/i/li/?n=2&i=images/20210710/1625923016909147.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) ---
上一篇:游戏辅助基础03:易语言大漠鼠标操作


下一篇:阿里云 NAS OSS 云盘价格对比 GB/小时