SensorsParameter.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System.Collections.Generic;
  2. using System.Drawing;
  3. namespace SHJX.Service.Common.Camera
  4. {
  5. public class SensorsParameter
  6. {
  7. #region properties
  8. /// <summary>
  9. /// 配置节点名称
  10. /// </summary>
  11. public string SectionName { get; set; }
  12. /// <summary>
  13. /// 摄像头采样区域
  14. /// </summary>
  15. public Rectangle RoiSample;
  16. /// <summary>
  17. /// 选用的摄像头名称,如:“Logitech HD Webcam C270”
  18. /// </summary>
  19. public string CamSensorName { get; set; }
  20. /// <summary>
  21. /// 是否自动定位像素处理目标区域位置
  22. /// </summary>
  23. public bool UseAutoUpdateRoiPos { get; set; }
  24. /// <summary>
  25. /// 是否使用目标区域精确像素定位:仅计算区域内G值大于指定阈值的像素点
  26. /// </summary>
  27. public bool UseRoiMask { get; set; }
  28. /// <summary>
  29. /// 目标区域内有效点的坐标
  30. /// </summary>
  31. public List<Point> RoiMaskPoints { get; set; }
  32. /// <summary>
  33. /// roi区域定位后,再进行偏移
  34. /// </summary>
  35. public int RoiOffsetX { get; set; }
  36. #endregion
  37. #region methods
  38. public SensorsParameter()
  39. {
  40. SectionName = "Sensors";
  41. RoiSample = new Rectangle(310, 210, 20, 20);
  42. CamSensorName = "Logitech HD Webcam C270";// "Logi C270 HD WebCam";//
  43. UseAutoUpdateRoiPos = true;
  44. UseRoiMask = true;
  45. RoiMaskPoints = null;
  46. RoiOffsetX = 0;
  47. }
  48. #endregion
  49. }
  50. }