|
|
|
namespace Cis.Application.Core;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 相机计算信息
|
|
|
|
/// </summary>
|
|
|
|
public class CameraCalcInfo
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Camera Id
|
|
|
|
/// </summary>
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Ptz 信息
|
|
|
|
/// </summary>
|
|
|
|
public PtzInfo PtzInfo { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 图像的宽度
|
|
|
|
/// </summary>
|
|
|
|
public int ImageWidth { get; set; } = 1920;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 图像的高度
|
|
|
|
/// </summary>
|
|
|
|
public int ImageHeight { get; set; } = 1080;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 最小焦距
|
|
|
|
/// </summary>
|
|
|
|
public double MinFocusX { get; set; } = 0f;
|
|
|
|
|
|
|
|
public double MinFocusY { get; set; } = 0f;
|
|
|
|
|
|
|
|
public static CameraCalcInfo New(long id, PtzInfo ptzInfo)
|
|
|
|
{
|
|
|
|
return new()
|
|
|
|
{
|
|
|
|
Id = id,
|
|
|
|
PtzInfo = ptzInfo
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Ptz 信息
|
|
|
|
/// </summary>
|
|
|
|
public class PtzInfo
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Pan 坐标
|
|
|
|
/// </summary>
|
|
|
|
public double Pan { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Tilt 坐标
|
|
|
|
/// </summary>
|
|
|
|
public double Tilt { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Zoom 坐标
|
|
|
|
/// </summary>
|
|
|
|
public double Zoom { get; set; }
|
|
|
|
|
|
|
|
public static PtzInfo New(double pan, double tilt, double zoom)
|
|
|
|
{
|
|
|
|
return new()
|
|
|
|
{
|
|
|
|
Pan = pan,
|
|
|
|
Tilt = tilt,
|
|
|
|
Zoom = zoom
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 标记标签计算信息
|
|
|
|
/// </summary>
|
|
|
|
public class MarkLabelCalcInfo
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// MarkLabel Id
|
|
|
|
/// </summary>
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Ptz 信息
|
|
|
|
/// </summary>
|
|
|
|
public PtzInfo PtzInfo { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 画布宽度
|
|
|
|
/// </summary>
|
|
|
|
public double CanvasWidth { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 画布高度
|
|
|
|
/// </summary>
|
|
|
|
public double CanvasHeight { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 画布 left 距离
|
|
|
|
/// </summary>
|
|
|
|
public double CanvasLeft { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 画布 top 距离
|
|
|
|
/// </summary>
|
|
|
|
public double CanvasTop { get; set; }
|
|
|
|
|
|
|
|
public static MarkLabelCalcInfo New(long id, PtzInfo ptzInfo, double canvasWidth, double canvasHeight, double canvasLeft, double canvasTop)
|
|
|
|
{
|
|
|
|
return new()
|
|
|
|
{
|
|
|
|
Id = id,
|
|
|
|
PtzInfo = ptzInfo,
|
|
|
|
CanvasWidth = canvasWidth,
|
|
|
|
CanvasHeight = canvasHeight,
|
|
|
|
CanvasLeft = canvasLeft,
|
|
|
|
CanvasTop = canvasTop
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 标记标签计算结果
|
|
|
|
/// </summary>
|
|
|
|
public class MarkLabelCalcResult
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// MarkLabel Id
|
|
|
|
/// </summary>
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// true 显示(在当前视频画面里面)
|
|
|
|
/// false 不显示(不在当前视频画面里面)
|
|
|
|
/// </summary>
|
|
|
|
public bool InFlag { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 画布 left 距离
|
|
|
|
/// </summary>
|
|
|
|
public double CanvasLeft { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 画布 top 距离
|
|
|
|
/// </summary>
|
|
|
|
public double CanvasTop { get; set; }
|
|
|
|
|
|
|
|
public static MarkLabelCalcResult New(long id, bool inFlag)
|
|
|
|
{
|
|
|
|
return new()
|
|
|
|
{
|
|
|
|
Id = id,
|
|
|
|
InFlag = inFlag
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public static MarkLabelCalcResult New(long id, bool inFlag, double canvasLeft, double canvasTop)
|
|
|
|
{
|
|
|
|
return new()
|
|
|
|
{
|
|
|
|
Id = id,
|
|
|
|
InFlag = inFlag,
|
|
|
|
CanvasLeft = canvasLeft,
|
|
|
|
CanvasTop = canvasTop
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|