Action5041.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using PaintDotNet.Data.Param;
  2. namespace PaintDotNet.Data.Action
  3. {
  4. /// <summary>
  5. /// Canny
  6. /// </summary>
  7. public class Action5041 : ParamObject
  8. {
  9. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  10. {
  11. return Adjust.EdgeDetectionIntent.ImageCanny(src, this.Lists);
  12. }
  13. public Action5041()
  14. {
  15. this.MenuId = ActionType.Canny;
  16. this.OpenImage = "current";
  17. //第一个参数
  18. DecimalNumber one = new DecimalNumber(0, 127);
  19. one.key = "Sigma";
  20. one.name = PdnResources.GetString("Menu.Image.Sigma.Text");
  21. one.DecimalPlaces = 1;
  22. one.initialValue = 1;
  23. one.value = 1;
  24. lists.Add(one);
  25. //第二个参数
  26. IntegerNumber two = new IntegerNumber(0, 100);
  27. two.key = "KernelSize1";
  28. two.name = PdnResources.GetString("Menu.ImageProcessing.boundarydetection.MinSize.text");
  29. two.initialValue = 20;
  30. two.value = 20;
  31. lists.Add(two);
  32. //第三个参数
  33. IntegerNumber three = new IntegerNumber(0, 100);
  34. three.key = "KernelSize2";
  35. three.name = PdnResources.GetString("Menu.ImageProcessing.boundarydetection.maxsize.text");
  36. three.initialValue = 100;
  37. three.value = 100;
  38. lists.Add(three);
  39. }
  40. }
  41. }