namespace Cis.Application.Core;
///
/// 相机计算信息
///
public class CameraCalcInfo
{
///
/// Camera Id
///
public long Id { get; set; }
///
/// Ptz 信息
///
public PtzInfo PtzInfo { get; set; }
///
/// 视频的宽度
///
public int VideoWidth { get; set; } = 1920;
///
/// 视频的高度
///
public int VideoHeight { 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
};
}
public static CameraCalcInfo New(long id, PtzInfo ptzInfo, int videoWidth, int videoHeight)
{
return new()
{
Id = id,
PtzInfo = ptzInfo,
VideoWidth = videoWidth,
VideoHeight = videoHeight
};
}
}
///
/// 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 VideoWidth { get; set; }
///
/// 视频高度
///
public double VideoHeight { get; set; }
///
/// 画布 left 距离比例
///
public double CanvasLeftRatio { get; set; }
///
/// 画布 top 距离比例
///
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
};
}
}
///
/// 标记标签计算结果
///
public class MarkLabelCalcResult
{
///
/// MarkLabel Id
///
public long Id { get; set; }
///
/// true 显示(在当前视频画面里面)
/// false 不显示(不在当前视频画面里面)
///
public bool InFlag { get; set; }
///
/// 画布 left 距离比例
///
public double CanvasLeftRatio { get; set; }
///
/// 画布 top 距离比例
///
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
};
}
}