//
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
//
namespace ImageSharp.Processing
{
using System;
using System.Diagnostics.CodeAnalysis;
///
/// The Laplacian of Gaussian 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 LaplacianOfGaussianProcessor : EdgeDetectorProcessor
where TColor : struct, IPackedPixel, IEquatable
{
///
/// The 2d gradient operator.
///
private static readonly float[][] LaplacianOfGaussianXY =
{
new float[] { 0, 0, -1, 0, 0 },
new float[] { 0, -1, -2, -1, 0 },
new float[] { -1, -2, 16, -2, -1 },
new float[] { 0, -1, -2, -1, 0 },
new float[] { 0, 0, -1, 0, 0 }
};
///
public override float[][] KernelXY => LaplacianOfGaussianXY;
}
}