/// <summary> /// 连接引擎 /// </summary> /// <param name="imageWindow"></param> public void ConnectEngine(AxIpeDspCtrlLib.AxIpeDspCtrl imageWindow, string str) { imageWindow.ConnectEngine(visionSystem.GetEngineObj()); // connect display object to the VisionSystem object //imageWindow.ConnectImgWindow("imgA");// connect display to VisionSystem image window imageWindow.ConnectImgWindow(str); // connect display to VisionSystem image window imageWindow.SetZoom((-1)); // set display zoom to stretch }
/// <summary> /// 横向移动ROI /// </summary> /// <param name="num"></param> /// <param name="currentNum"></param> /// <param name="imageWindow"></param> public void HS_Move_Scroll(int num, int currentNum, AxIpeDspCtrlLib.AxIpeDspCtrl imageWindow) { try { if (num > currentNum) //Move Right { visionSystem.RoiMove("RectA", 1, 0); } else if (num < currentNum) //Move Left { visionSystem.RoiMove("RectA", -1, 0); } imageWindow.UpdateDisplay(); } catch (System.Exception ex) { log.LogErr(ex); } }
/// <summary> /// 横向改变ROI的尺寸 /// </summary> /// <param name="num"></param> /// <param name="currentNum"></param> /// <param name="imageWindow"></param> public void HS_Resize_Scroll(int num, int currentNum, AxIpeDspCtrlLib.AxIpeDspCtrl imageWindow) { try { if (num > currentNum) // Larger Horizontally { visionSystem.RoiCoordMove("RectA", 0, -1, 0); visionSystem.RoiCoordMove("RectA", 1, 1, 0); } else if (num < currentNum)// Smaller Horizontally { visionSystem.RoiCoordMove("RectA", 0, 1, 0); visionSystem.RoiCoordMove("RectA", 1, -1, 0); } imageWindow.UpdateDisplay(); } catch (System.Exception ex) { log.LogErr(ex); } }