using HalconDotNet; using Rs.Controls; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Rs.MotionPlat.Commom { public class ImageRotate { public static HObject Rotate(HObject sourceImg,string cameraName) { HObject hImage = new HObject(); switch (cameraName) { case "upCamera": HOperatorSet.RotateImage(sourceImg, out hImage, SysConfigParam.GetValue("UpCameraRotate"), "constant"); break; case "downCamera": HOperatorSet.RotateImage(sourceImg, out hImage, SysConfigParam.GetValue("DownLocationCameraRotate"), "constant"); break; } return hImage; } public static HObject[] Rotates(HObject[] sourceImg, string cameraName) { List hImages = new List(); foreach (HObject img in sourceImg) { hImages.Add(Rotate(img, cameraName)); } return hImages.ToArray(); } } }