using System; using HalconDotNet; using static DataStruct.DataStructClass; using ToolBase; using CommonMethods; using ViewROI; namespace FindCircle { [Serializable] public class FindClrcle: IToolBase { /// /// 输入位姿 /// internal PosXYU inputPose = new PosXYU(); /// /// 期望圆圆心行坐标 /// internal HTuple expectCircleRow = 300; /// /// 期望圆圆心列坐标 /// internal HTuple expectCircleCol = 300; /// /// 期望圆半径 /// internal HTuple expectCircleRadius = 200; /// /// 查找到圆的圆心行坐标 /// private double _resultCircleRow = 0; internal double ResultCircleRow { get { return Math.Round(_resultCircleRow, 3); } set { _resultCircleRow = value; } } /// /// 查找到的圆的圆心列坐标 /// private double _resultCircleCol = 0; internal double ResultCircleCol { get { return Math.Round(_resultCircleCol, 3); } set { _resultCircleCol = value; } } /// /// 查找到的圆的半径 /// private double resultCircleRadius = 0; internal double ResultCircleRadius { get { return Math.Round(resultCircleRadius, 3); } } /// /// 起始角度 /// internal double startAngle = 10; /// /// 结束角度 /// internal double endAngle = 360; /// /// 运行工具时是否刷新输入图像 /// internal bool updateImage = false; /// /// 圆环径向长度 /// internal double ringRadiusLength = 80; /// /// 边阈值 /// internal int threshold = 30; /// /// 卡尺 /// internal HObject contours; /// /// 找边极性,从明到暗或从暗到明 /// internal string polarity = "negative"; /// /// 卡尺数量 /// internal int cliperNum = 20; /// /// 新的跟随姿态变化后的预期圆信息 /// HTuple newExpecCircleRow = new HTuple(200), newExpectCircleCol = new HTuple(200), newExpectCircleRadius = new HTuple(200); /// /// 制作模板时的输入位姿 /// internal PosXYU templatePose = new PosXYU(); public override void Run(SoftwareRunState softwareRunState) { } public override void DispImage() { } public override void DispMainWindow(HWindowTool_Smart window) { throw new NotImplementedException(); } } }