53 lines
1.9 KiB
C#
53 lines
1.9 KiB
C#
using System.Drawing;
|
|
|
|
namespace XP.Calibration.Models;
|
|
|
|
/// <summary>
|
|
/// 椭圆拟合结果 | Ellipse fitting result
|
|
/// </summary>
|
|
public record EllipseResult
|
|
{
|
|
public PointF Center { get; init; }
|
|
public float LongAxis { get; init; }
|
|
public float ShortAxis { get; init; }
|
|
public float Angle { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 几何参数 | Geometry parameters for CT system
|
|
/// </summary>
|
|
public class GeoParams
|
|
{
|
|
/// <summary>焦点到旋转中心距离 (mm) | Distance Source to Origin</summary>
|
|
public double DSO { get; set; }
|
|
/// <summary>焦点到探测器距离 (mm) | Distance Source to Detector</summary>
|
|
public double DSD { get; set; }
|
|
/// <summary>探测器像素大小 (mm) | Detector pixel size</summary>
|
|
public double PixelSize { get; set; }
|
|
/// <summary>探测器水平像素数 | Detector horizontal pixel count</summary>
|
|
public int NDetecU { get; set; }
|
|
/// <summary>探测器垂直像素数 | Detector vertical pixel count</summary>
|
|
public int NDetecV { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 中心校准结果 | Center calibration result
|
|
/// </summary>
|
|
public record CenterCalibrationResult
|
|
{
|
|
/// <summary>椭圆拟合结果</summary>
|
|
public EllipseResult Ellipse { get; init; } = null!;
|
|
/// <summary>倾斜角 (度) | Tilt angle in degrees</summary>
|
|
public double AlphaDeg { get; init; }
|
|
/// <summary>反算半径 R (mm)</summary>
|
|
public double R_mm { get; init; }
|
|
/// <summary>透视偏移量 (像素) | Perspective offset in pixels</summary>
|
|
public double DeltaPx { get; init; }
|
|
/// <summary>修正后焦点投影 U 坐标</summary>
|
|
public double FocalU { get; init; }
|
|
/// <summary>修正后焦点投影 V 坐标</summary>
|
|
public double FocalV { get; init; }
|
|
/// <summary>各帧检测到的球心坐标</summary>
|
|
public List<PointF> DetectedCenters { get; init; } = new();
|
|
}
|