Action5032.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using PaintDotNet.Data.Param;
  2. namespace PaintDotNet.Data.Action
  3. {
  4. /// <summary>
  5. /// 低通滤波
  6. /// </summary>
  7. public class Action5032 : ParamObject
  8. {
  9. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  10. {
  11. return Adjust.SmoothIntent.LowPassFiltering(src, this.Lists);
  12. }
  13. public Action5032()
  14. {
  15. this.MenuId = ActionType.LowPassFiltering;
  16. this.OpenImage = "current";
  17. //第一个参数
  18. OddNumber one = new OddNumber(3, 255);
  19. one.key = "KernelSizeX";
  20. one.name = PdnResources.GetString("Menu.radius.text")+"X";
  21. one.initialValue = 3;
  22. one.value = 3;
  23. lists.Add(one);
  24. //第二个参数
  25. OddNumber two = new OddNumber(3, 255);
  26. two.key = "KernelSizeX";
  27. two.name = PdnResources.GetString("Menu.radius.text")+"Y";
  28. two.initialValue = 3;
  29. two.value = 3;
  30. lists.Add(two);
  31. //第三个参数
  32. IntegerNumber three = new IntegerNumber(1, 100);
  33. three.key = "Count";
  34. three.name = PdnResources.GetString("Menu.numberoftimes.text");
  35. three.initialValue = 1;
  36. three.value = 1;
  37. lists.Add(three);
  38. }
  39. }
  40. }