Пример #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);
     }
 }
 public CmdIntCommand(SWIGTYPE_p_f_r_std__istream_r_std__ostream_r_JL_VisionLib_V3__VisLibCmdInt__void proc, VisLibCmdInt cInt) : this(VisionLabPINVOKE.new_CmdIntCommand(SWIGTYPE_p_f_r_std__istream_r_std__ostream_r_JL_VisionLib_V3__VisLibCmdInt__void.getCPtr(proc), VisLibCmdInt.getCPtr(cInt)), true)
 {
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VisLibCmdInt obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
 internal static HandleRef getCPtr(VisLibCmdInt obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }