public void ApplyTo(MonoImage <TPixel> image) { MonoImage <TPixel> intermediateImage = image.Clone() as MonoImage <TPixel>; ApplyHorizontally(image, intermediateImage); ApplyVertically(intermediateImage, image); }
public void ApplyTo(MonoImage <float> image) { MonoImage <float> unsharpMask = image.Clone() as MonoImage <float>; unsharpMask.Apply(new ParallelGaussianBlur(_radius, _sigma)); unsharpMask.Apply(new ParallelMultiplication(_weight)); image.Apply(new ParallelImageSubtraction(unsharpMask)); double normalisingFactor = 1 / (1 - _weight); image.Apply(new ParallelMultiplication(normalisingFactor)); }