Action5035.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Resources;
  2. using SmartCoalApplication.Core;
  3. using SmartCoalApplication.Core.Param;
  4. namespace SmartCoalApplication.Data.Action
  5. {
  6. /// <summary>
  7. /// 双边滤波
  8. /// </summary>
  9. public class Action5035 : ParamObject
  10. {
  11. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  12. {
  13. return Adjust.SmoothIntent.BilateralFiltering(src, this.Lists);
  14. }
  15. public Action5035()
  16. {
  17. this.MenuId = ActionType.BilateralFiltering;
  18. this.OpenImage = "current";
  19. //第一个参数
  20. OddNumber one = new OddNumber(1, 255);
  21. one.key = "Diameter";
  22. one.name = PdnResources.GetString("Menu.ImageProcessing.smooth.Neighborhooddiameter.text");
  23. one.initialValue = 1;
  24. one.value = 1;
  25. lists.Add(one);
  26. //第二个参数
  27. IntegerNumber two = new IntegerNumber(1, 200);
  28. two.key = "SigmaColor";
  29. two.name = PdnResources.GetString("Menu.Image.Sigma.Text")+"C";
  30. two.initialValue = 1;
  31. two.value = 1;
  32. lists.Add(two);
  33. //第二个参数
  34. IntegerNumber three = new IntegerNumber(1, 200);
  35. three.key = "SigmaSpace";
  36. three.name = PdnResources.GetString("Menu.Image.Sigma.Text")+"S";
  37. three.initialValue = 1;
  38. three.value = 1;
  39. lists.Add(three);
  40. }
  41. }
  42. }