laplacianOfGaussian

Create laplacian of gaussian $(LINK3 http://homepages.inf.ed.ac.uk/rbf/HIPR2/log.htm, (LoG)) filter kernel.

Slice!(Contiguous, [2], T*)
laplacianOfGaussian
(
T = double
)
(,
size_t width
,
size_t height
)

Parameters

sigma T

gaussian sigma variance value

width size_t

width of the kernel matrix

height size_t

height of the kernel matrix

Examples

t
{
    import std.algorithm.comparison : equal;
    import std.math : approxEqual;

    auto log = laplacianOfGaussian!float(0.84f, 3, 3);
    auto expected = [0.147722, -0.00865228, 0.147722, -0.00865228,
        -0.556277, -0.00865228, 0.147722, -0.00865228, 0.147722].sliced(3, 3);
    assert(equal!approxEqual(log.flattened, expected.flattened)

Meta