Files
Ayay/SHH.CameraSdk/Abstractions/Models/PreprocessConfig.cs
twice109 2ee25a4f7c 支持通过网页增加、删除、修改摄像头配置信息
支持摄像头配置信息中句柄的设置,并实测有效
2025-12-28 08:07:55 +08:00

69 lines
2.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace SHH.CameraSdk
{
/// <summary>
/// 图像预处理配置模型
/// 用于定义相机采集后的原始帧在分发给订阅者之前的通用处理参数
/// </summary>
public class PreprocessConfig
{
#region --- (Resolution & Scale) ---
/// <summary>
/// 目标输出宽度(单位:像素)
/// 范围约束176 - 1920 px
/// </summary>
public int Width { get; set; }
/// <summary>
/// 目标输出高度(单位:像素)
/// 范围约束44 - 1080 px
/// </summary>
public int Height { get; set; }
/// <summary>
/// 等比缩放倍率(基于原始分辨率的系数)
/// 例如0.5 表示缩小一半1.2 表示放大 20%
/// </summary>
public double Scale { get; set; } = 1.0;
/// <summary>
/// 是否锁定等比缩放
/// true: 修改宽度时高度按比例自动调整false: 允许拉伸或压缩变形
/// </summary>
public bool IsAspectRatio { get; set; } = true;
#endregion
#region --- (Business Constraints) ---
/// <summary>
/// 是否允许缩小图像
/// 默认为 true。若为 false则 Target 尺寸不得低于原始分辨率
/// </summary>
public bool AllowShrink { get; set; } = true;
/// <summary>
/// 是否启用放大功能
/// 默认为 false。若未开启当目标尺寸大于原始分辨率时将强制回退到原始尺寸
/// </summary>
public bool AllowEnlarge { get; set; } = false;
#endregion
#region --- (Image Enhancement) ---
/// <summary>
/// 是否开启图像增量(亮度/对比度补偿)
/// 只有此项为 true 时Brightness 增益参数才会生效
/// </summary>
public bool EnableGain { get; set; } = false;
/// <summary>
/// 图像增量百分比Gain/Gamma 调节)
/// 范围0 - 100%。用于在暗光环境下提升画面可见度
/// </summary>
public int Brightness { get; set; } = 0;
#endregion
}
}