Action5033.cs 771 B

123456789101112131415161718192021222324252627282930
  1. using PaintDotNet.Data.Param;
  2. namespace PaintDotNet.Data.Action
  3. {
  4. /// <summary>
  5. /// 中值滤波
  6. /// </summary>
  7. public class Action5033 : ParamObject
  8. {
  9. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  10. {
  11. return Adjust.SmoothIntent.MedianFiltering(src, this.Lists);
  12. }
  13. public Action5033()
  14. {
  15. this.MenuId = ActionType.MedianFiltering;
  16. this.OpenImage = "current";
  17. //第一个参数
  18. OddNumber one = new OddNumber(3, 255);
  19. one.key = "KernelSize";
  20. one.name = PdnResources.GetString("Menu.radius.text");
  21. one.initialValue = 3;
  22. one.value = 3;
  23. lists.Add(one);
  24. }
  25. }
  26. }