// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageSharp.Processing.Processors { using System; using System.Diagnostics.CodeAnalysis; /// /// The Laplacian 5 x 5 operator filter. /// /// /// The pixel format. [SuppressMessage("ReSharper", "StaticMemberInGenericType", Justification = "We want to use only one instance of each array field for each generic type.")] public class Laplacian5X5Processor : EdgeDetectorProcessor where TColor : struct, IPackedPixel, IEquatable { /// /// The 2d gradient operator. /// private static readonly Fast2DArray Laplacian5X5XY = new Fast2DArray(new float[,] { { -1, -1, -1, -1, -1 }, { -1, -1, -1, -1, -1 }, { -1, -1, 24, -1, -1 }, { -1, -1, -1, -1, -1 }, { -1, -1, -1, -1, -1 } }); /// /// Initializes a new instance of the class. /// public Laplacian5X5Processor() : base(Laplacian5X5XY) { } } }