Exemplo n.º 1
0
        private IImageProcess actions(IImageProcess action, String actionString)
        {
            Bitmap bitmap = bitmapFromSource();

            Stopwatch sw = TimeCountStart();

            action.setResouceImage(bitmap);
            Bitmap resBitmap = action.Process();

            UIMessage(actionString, sw);
            setResultBitmap(resBitmap);

            return(action);
        }
Exemplo n.º 2
0
 public static bool Run(HImage himage, HObject region, out HObject xld, out int index, out string message)
 {
     // Thread.Sleep(30);  //算法运行时间
     //xld = null;
     //index = 999;
     //message = "图像处理失败";
     //return true;
     try
     {
         return(imageProcess.Process(himage, region, out xld, out index, out message));
     }
     catch
     {
         xld     = null;
         index   = 999;
         message = "图像处理失败";
         return(false);
     }
 }