OTSImageProcessParam.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #pragma once
  2. #include "afx.h"
  3. #include "IntRange.h"
  4. #include "DoubleRange.h"
  5. #include "XMLSerialization.h"
  6. // COTSStageData command target
  7. namespace OTSIMGPROC
  8. {
  9. using namespace OTSDATA;
  10. __declspec(dllexport) const int DEFUALT_PARTICALE_AREA_MIN = 1;
  11. __declspec(dllexport) const int DEFUALT_PARTICALE_AREA_MAX = 200;
  12. __declspec(dllexport) const int DEFUALT_BG_GRAY_LEVEL_MIN = 150;
  13. __declspec(dllexport) const int DEFUALT_BG_GRAY_LEVEL_MAX = 255;
  14. __declspec(dllexport) const int DEFUALT_PARTICLE_GRAY_LEVEL_MIN = 5;
  15. __declspec(dllexport) const int DEFUALT_PARTICLE_GRAY_LEVEL_MAX = 155;
  16. class __declspec(dllexport) COTSImageProcessParam : public xmls::ISlo
  17. {
  18. public:
  19. COTSImageProcessParam(); // constructor
  20. COTSImageProcessParam(const COTSImageProcessParam&); // copy constructor
  21. COTSImageProcessParam(COTSImageProcessParam*); // copy constructor
  22. COTSImageProcessParam& operator=(const COTSImageProcessParam&); // =operator
  23. BOOL operator==(const COTSImageProcessParam&); // =operator
  24. virtual ~COTSImageProcessParam(); // detractor
  25. // serialization
  26. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  27. CDoubleRange GetIncArea() const { return m_oIncArea; }
  28. void SetIncArea(CDoubleRange a_oVal) { m_oIncArea = a_oVal; }
  29. CIntRange GetBGGray() const { return m_oBGGray; }
  30. void SetBGGray(CIntRange a_oVal) { m_oBGGray = a_oVal; }
  31. CIntRange GetParticleGray() const { return m_oParticleGray; }
  32. void SetParticleGray(CIntRange a_oVal) { m_oParticleGray = a_oVal; }
  33. OTS_BGREMOVE_TYPE GetBGRemoveType() const { return (OTS_BGREMOVE_TYPE)m_BGRemoveType; }
  34. void SetBGRemoveType(int a_oVal) { m_BGRemoveType = a_oVal; }
  35. OTS_AUTOBGREMOVE_TYPE GetAutoBGRemoveType() const { return(OTS_AUTOBGREMOVE_TYPE)m_autoBGRemoveType; }
  36. void SetAutoBGRemoveType(int a_oVal) { m_autoBGRemoveType = a_oVal; }
  37. protected:
  38. // cleanup
  39. void Cleanup();
  40. // initialization
  41. void Init();
  42. // duplication
  43. void Duplicate(const COTSImageProcessParam& a_oSource);
  44. private:
  45. CDoubleRange m_oIncArea; //셸憧膠충생
  46. CIntRange m_oBGGray; //교쒼뿍똑
  47. CIntRange m_oParticleGray; //셸憧膠뿍똑
  48. int m_BGRemoveType;
  49. int m_autoBGRemoveType;
  50. };
  51. typedef std::shared_ptr<COTSImageProcessParam> __declspec(dllexport) COTSImageProcessParamPtr;
  52. typedef std::vector<COTSImageProcessParamPtr> __declspec(dllexport) COTSImageProcessParamsList;
  53. }