From c5f1348876ec8263b37838068e9a7aec22aabb19 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: 6d3e173bdfc0ca00998c7b97aa4693733355ce22 Former-commit-id: 3a4437ebf245b6d9aa9d79c14f6a509c290b08c1 Former-commit-id: bac9689e40181c18f9b13d553510eb6a6765ea7b --- .../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 fd7befdad..1e45c09de 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;