You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
181 lines
3.3 KiB
181 lines
3.3 KiB
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 VideoWidth { get; set; } = 1920;
|
|
|
|
/// <summary>
|
|
/// 视频的高度
|
|
/// </summary>
|
|
public int VideoHeight { 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
|
|
};
|
|
}
|
|
|
|
public static CameraCalcInfo New(long id, PtzInfo ptzInfo, int videoWidth, int videoHeight)
|
|
{
|
|
return new()
|
|
{
|
|
Id = id,
|
|
PtzInfo = ptzInfo,
|
|
VideoWidth = videoWidth,
|
|
VideoHeight = videoHeight
|
|
};
|
|
}
|
|
}
|
|
|
|
/// <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 VideoWidth { get; set; }
|
|
|
|
/// <summary>
|
|
/// 视频高度
|
|
/// </summary>
|
|
public double VideoHeight { get; set; }
|
|
|
|
/// <summary>
|
|
/// 画布 left 距离比例
|
|
/// </summary>
|
|
public double CanvasLeftRatio { get; set; }
|
|
|
|
/// <summary>
|
|
/// 画布 top 距离比例
|
|
/// </summary>
|
|
public double CanvasTopRatio { get; set; }
|
|
|
|
public static MarkLabelCalcInfo New(long id, PtzInfo ptzInfo, double videoWidth, double videoHeight, double canvasLeftRatio, double canvasTopRatio)
|
|
{
|
|
return new()
|
|
{
|
|
Id = id,
|
|
PtzInfo = ptzInfo,
|
|
VideoWidth = videoWidth,
|
|
VideoHeight = videoHeight,
|
|
CanvasLeftRatio = canvasLeftRatio,
|
|
CanvasTopRatio = canvasTopRatio
|
|
};
|
|
}
|
|
}
|
|
|
|
/// <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 CanvasLeftRatio { get; set; }
|
|
|
|
/// <summary>
|
|
/// 画布 top 距离比例
|
|
/// </summary>
|
|
public double CanvasTopRatio { 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 canvasLeftRatio, double canvasTopRatio)
|
|
{
|
|
return new()
|
|
{
|
|
Id = id,
|
|
InFlag = inFlag,
|
|
CanvasLeftRatio = canvasLeftRatio,
|
|
CanvasTopRatio = canvasTopRatio
|
|
};
|
|
}
|
|
}
|