CamParamConfig.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #pragma once
  2. #include "../../Common/CameraBaseClass/IBaseCamParamConfig.h"
  3. //#include "DialogCamPasram.h"
  4. //#include "tisudshl.h"
  5. /// 相机参数设置接口定义
  6. class ICamParamConfig : public IBaseCamParamConfig
  7. {
  8. friend class DialogCamPasram;
  9. public:
  10. /// 获取亮度值
  11. virtual int brightnes() = 0;
  12. /// 获取对比度值
  13. virtual int contrast() = 0;
  14. /// 获取清晰度值
  15. virtual int distinct() = 0;
  16. /// 获取伽马校正因子
  17. virtual int gammaFactor() = 0;
  18. /// 设置亮度值 参数范围(0-100)
  19. virtual bool setBrightnes( int ) = 0;
  20. /// 设置对比度值 参数范围(0-100)
  21. virtual bool setContrast( int ) = 0;
  22. /// 设置晰度值 参数范围(0-100)
  23. virtual bool setDistinct( int ) = 0;
  24. /// 设置伽马校正因子 参数范围(0-100)
  25. virtual bool setGammaFactor( int ) = 0;
  26. };
  27. /// 映美精相机参数设置接口实现
  28. class CamParamConfig : public ICamParamConfig
  29. {
  30. friend class EntityCamera;
  31. public:
  32. CamParamConfig( class EntityCamera* cam );
  33. ~CamParamConfig(void);
  34. private:
  35. // CSimplePropertyAccess mPropertyAccess;
  36. // DShowLib::Grabber *mGrabber;
  37. class EntityCamera* m_pCamera;
  38. public:
  39. /*--------ICamParamConfig-----*/
  40. /// 配置参数
  41. bool configParam( const QString configXML );
  42. /// 设置曝光值
  43. bool setExposure( double );
  44. /// 获取曝光值
  45. double getExposure();
  46. /// 设置曝光值自动
  47. bool setExposureAuto( bool );
  48. /// 曝光是否自动
  49. bool isExposureAuto( );
  50. /// 设置增益值
  51. bool setGain( int );
  52. /// 获取增益值
  53. int getGain();
  54. /// 设置增益值自动
  55. bool setGainAuto( bool );
  56. /// 增益是否自动
  57. bool isGainAuto( );
  58. /// 设置白平衡 参数2值范围:0~255
  59. bool setWhiteBalance( colourRgb, int );
  60. /// 获取白平衡值
  61. int getWhiteBalance( colourRgb );
  62. /// 设置白平衡自动
  63. bool setWhiteBalanceAuto( bool );
  64. /// 白平衡是否自动
  65. bool isWhiteBalanceAuto( );
  66. ///////////////////////////////
  67. /*--------ENTITYCamParamConfig-----*/
  68. /// 获取亮度值
  69. int brightnes();
  70. /// 获取对比度值
  71. int contrast();
  72. /// 获取清晰度值
  73. int distinct();
  74. /// 获取伽马校正因子
  75. int gammaFactor();
  76. /// 设置亮度值
  77. bool setBrightnes( int );
  78. /// 设置对比度值
  79. bool setContrast( int );
  80. /// 设置晰度值
  81. bool setDistinct( int );
  82. /// 设置伽马校正因子
  83. bool setGammaFactor( int );
  84. };