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); }
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); } }