Action5016.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using Resources;
  2. using SmartCoalApplication.Core;
  3. using SmartCoalApplication.Core.Param;
  4. using System.Collections.Generic;
  5. namespace SmartCoalApplication.Data.Action
  6. {
  7. /// <summary>
  8. /// 亮度/对比度/伽马值
  9. /// </summary>
  10. public class Action5016 : ParamObject
  11. {
  12. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  13. {
  14. return Adjust.AdjustIntent.BCGTransferFunction(src, this.Lists);
  15. }
  16. public Action5016()
  17. {
  18. this.MenuId = ActionType.ActionBCG;
  19. this.OpenImage = "current";
  20. //第一个参数
  21. IntegerNumber one = new IntegerNumber(-100, 100);
  22. one.key = "Brightness";
  23. one.name = PdnResources.GetString("Menu.luminance.text");
  24. one.initialValue = 0;
  25. one.value = 0;
  26. lists.Add(one);
  27. //第二个参数
  28. DecimalNumber two = new DecimalNumber(0, 2);
  29. two.key = "Contrast";
  30. two.name = PdnResources.GetString("Menu.Contrast.text");
  31. two.DecimalPlaces = 1;
  32. two.initialValue = 1.0;
  33. two.value = 1.0;
  34. lists.Add(two);
  35. //第三个参数
  36. DecimalNumber three = new DecimalNumber(0, 2);
  37. three.key = "Gamma";
  38. three.name = PdnResources.GetString("Menu.Gammavalue.text");
  39. three.DecimalPlaces = 1;
  40. three.initialValue = 1.0;
  41. three.value = 1.0;
  42. lists.Add(three);
  43. }
  44. }
  45. }