zoukankan      html  css  js  c++  java
  • 大漠插件

    一.注册大漠插件

    下载:Click

    两种方式

    1.Cmd手动注册dll

    regsvr32 D:Project大漠DMTestdm.dll

    2.程序注册dll

            static string AutoRegCom()
            {
                string strCmd = @"regsvr32 D:Project大漠DMTestdm.dll";
                string rInfo;
                try
                {
                    Process myProcess = new Process();
                    ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("cmd.exe");
                    myProcessStartInfo.UseShellExecute = false;
                    myProcessStartInfo.CreateNoWindow = true;
                    myProcessStartInfo.RedirectStandardOutput = true;
                    myProcess.StartInfo = myProcessStartInfo;
                    myProcessStartInfo.Arguments = "/c " + strCmd;
                    myProcess.Start();
                    StreamReader myStreamReader = myProcess.StandardOutput;
                    rInfo = myStreamReader.ReadToEnd();
                    myProcess.Close();
                    rInfo = strCmd + "
    " + rInfo;
                    return rInfo;
                }
                catch (Exception ex)
                {
                    return ex.Message;
                }
            }

    二.初始化大漠类

    引用:using Dm;

    声明大漠插件:

    dmsoft dm = new dmsoft();

    三.建立字库

    管理员身份打开大漠综合工具

    设置字库文件路径→抓图→截取字体→提取点阵→自定义文字→添加到当前字库

    完成后查看是否添加成功

    如何找字?

                //设置大漠的项目文件
                dm.SetPath(@"C:Usersszsm.zhangtingDesktopdll");
                //设置字库引用
                dm.SetDict(0, "tt.txt");
                //调用Ocr寻找对应位置是否存在字库中的文字
                string name = dm.Ocr(429, 440, 478, 456, "000000-000000", 1.0);  
  • 相关阅读:
    129. Sum Root to Leaf Numbers
    113. Path Sum II
    114. Flatten Binary Tree to Linked List
    112. Path Sum
    100. Same Tree
    300. Longest Increasing Subsequence
    72. Edit Distance
    自定义js标签库
    JS 实现Table相同行的单元格自动合并示例代码
    mysql 高版本only_full_group_by 错误
  • 原文地址:https://www.cnblogs.com/tangpeng97/p/12696074.html
Copyright © 2011-2022 走看看