コード例 #1
0
 /*
  *  Description:
  *     - Initialize command interpreter
  *     - add BlobMatcher
  *     - Add Scripts
  */
 public static void Init()
 {
     try
     {
         if (cmdInt == null)
         {
             cmdInt = VisionLab.VisLibCmdIntCreate(100000, EchoMode.EchoOff, false);
         }
         String exePath = Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
         String result;
         result = cmdInt.ExecRequest("PM_ReadFromFile PatternMatcher " + exePath + "\\..\\..\\..\\..\\..\\..\\VL\\lic_fonts.pm");
         result = cmdInt.ExecRequest("AddScript FindPlate " + exePath + "\\..\\..\\..\\..\\..\\..\\VL\\find_plate.jls");
         result = cmdInt.ExecRequest("AddScript FindCharacters " + exePath + "\\..\\..\\..\\..\\..\\..\\VL\\find_characters.jls");
         result = cmdInt.ExecRequest("AddScript MatchPlate " + exePath + "\\..\\..\\..\\..\\..\\..\\VL\\match_plate.jls");
         result = cmdInt.ExecRequest("SetPrecision 6");
     }
     catch (System.Exception ex)
     {
         throw new Exception("Init: " + ex.Message);
     }
 }