using PaintDotNet.Data.Param; namespace PaintDotNet.Data.Action { /// /// 双边滤波 /// public class Action5035 : ParamObject { public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src) { return Adjust.SmoothIntent.BilateralFiltering(src, this.Lists); } public Action5035() { this.MenuId = ActionType.BilateralFiltering; this.OpenImage = "current"; //第一个参数 OddNumber one = new OddNumber(1, 255); one.key = "Diameter"; one.name = PdnResources.GetString("Menu.ImageProcessing.smooth.Neighborhooddiameter.text"); one.initialValue = 1; one.value = 1; lists.Add(one); //第二个参数 IntegerNumber two = new IntegerNumber(1, 200); two.key = "SigmaColor"; two.name = PdnResources.GetString("Menu.Image.Sigma.Text")+"C"; two.initialValue = 1; two.value = 1; lists.Add(two); //第二个参数 IntegerNumber three = new IntegerNumber(1, 200); three.key = "SigmaSpace"; three.name = PdnResources.GetString("Menu.Image.Sigma.Text")+"S"; three.initialValue = 1; three.value = 1; lists.Add(three); } } }