Пример #1
0
 /// <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);
     }
 }
Пример #2
0
 /// <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);
     }
 }