Skip to content

Error When Using SMatrix for FIR Separable Filtration #252

@RoyiAvital

Description

@RoyiAvital

This code works:

using Images;
using StaticArrays;

mA = rand(RGB{Float32}, 2048, 2048);

vW = [0.2f0 -0.5f0 0.3f0];
vW = centered(vW);

imfilter(mA, (vW', vW), "replicate", ImageFiltering.Algorithm.FIR());

Yet with this change:

using Images;
using StaticArrays;

mA = rand(RGB{Float32}, 2048, 2048);

vW = SMatrix{1, 3, Float32}([0.2f0 -0.5f0 0.3f0]);
vW = centered(vW);

imfilter(mA, (vW', vW), "replicate", ImageFiltering.Algorithm.FIR());

It will fail.

Environment information:

  • OS: Windows 10 64 Bit.
  • Julia: 1.8.3.
  • Images.jl: 0.25.2.
  • ImageFiltering.jl: 0.7.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions