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