From 12e21f2c94dd753452b4c5b5d4c3744f285bc425 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sat, 7 Nov 2015 22:25:37 +1100 Subject: [PATCH] Add sharpen overloads Former-commit-id: 82794ccf253687d252b9433159e69b2f7b2d78d2 Former-commit-id: 817e2f7b9864179f768cef63e0724af810eeec0d Former-commit-id: fad4ba746a8acc81a2d154804ace87a02be1414a --- .../Filters/Convolution/GuassianSharpen.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/ImageProcessor/Filters/Convolution/GuassianSharpen.cs b/src/ImageProcessor/Filters/Convolution/GuassianSharpen.cs index fd7befdad6..1e45c09de5 100644 --- a/src/ImageProcessor/Filters/Convolution/GuassianSharpen.cs +++ b/src/ImageProcessor/Filters/Convolution/GuassianSharpen.cs @@ -44,6 +44,34 @@ namespace ImageProcessor.Filters this.sigma = sigma; } + /// + /// Initializes a new instance of the class. + /// + /// + /// The 'radius' value representing the size of the area to sample. + /// + public GuassianSharpen(int radius) + { + this.kernelSize = (radius * 2) + 1; + this.sigma = radius; + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The 'sigma' value representing the weight of the sharpen. + /// + /// + /// The 'radius' value representing the size of the area to sample. + /// This should be at least twice the sigma value. + /// + public GuassianSharpen(float sigma, int radius) + { + this.kernelSize = (radius * 2) + 1; + this.sigma = sigma; + } + /// public override float[,] KernelX => this.kernelX;