_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.9.3 (2023-08-24)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Images, ImageFiltering
julia> img = zeros(RGB24, (170, 287));
julia> imfilter!(img, img, Kernel.gaussian(8.0))
ERROR: TypeError: in Type{...} expression, expected UnionAll, got Type{RGB24}
Stacktrace:
[1] filtfft(A::OffsetArrays.OffsetMatrix{RGB24, Matrix{RGB24}}, krn::FFTViews.FFTView{Float64, 2, Matrix{Float64}})
@ ImageFiltering ~/.julia/packages/ImageFiltering/OyzRu/src/imfilter.jl:845
[2] _imfilter_fft!(r::ComputationalResources.CPU1{ImageFiltering.Algorithm.FFT}, out::Matrix{RGB24}, A::OffsetArrays.OffsetMatrix{RGB24, Matrix{RGB24}}, kernel::Tuple{OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}, OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}}, border::NoPad{Pad{2}})
@ ImageFiltering ~/.julia/packages/ImageFiltering/OyzRu/src/imfilter.jl:820
[3] imfilter!(r::ComputationalResources.CPU1{ImageFiltering.Algorithm.FFT}, out::Matrix{RGB24}, A::OffsetArrays.OffsetMatrix{RGB24, Matrix{RGB24}}, kernel::Tuple{OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}, OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}}, border::NoPad{Pad{2}})
@ ImageFiltering ~/.julia/packages/ImageFiltering/OyzRu/src/imfilter.jl:807
[4] imfilter!(r::ComputationalResources.CPU1{ImageFiltering.Algorithm.FFT}, out::Matrix{RGB24}, img::Matrix{RGB24}, kernel::Tuple{OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}, OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}}, border::Pad{2})
@ ImageFiltering ~/.julia/packages/ImageFiltering/OyzRu/src/imfilter.jl:340
[5] imfilter!(r::ComputationalResources.CPU1{ImageFiltering.Algorithm.FFT}, out::Matrix{RGB24}, img::Matrix{RGB24}, kernel::Tuple{OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}, OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}}, border::Pad{0})
@ ImageFiltering ~/.julia/packages/ImageFiltering/OyzRu/src/imfilter.jl:327
[6] imfilter!(out::Matrix{RGB24}, img::Matrix{RGB24}, kernel::Tuple{OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}, OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}}}, border::Pad{0}, alg::ImageFiltering.Algorithm.FFT)
@ ImageFiltering ~/.julia/packages/ImageFiltering/OyzRu/src/imfilter.jl:236
[7] imfilter!
@ ~/.julia/packages/ImageFiltering/OyzRu/src/imfilter.jl:230 [inlined]
[8] imfilter!
@ ~/.julia/packages/ImageFiltering/OyzRu/src/imfilter.jl:213 [inlined]
[9] imfilter!(::Matrix{RGB24}, ::Matrix{RGB24}, ::OffsetArrays.OffsetMatrix{Float64, Matrix{Float64}})
@ ImageFiltering ~/.julia/packages/ImageFiltering/OyzRu/src/imfilter.jl:205
[10] top-level scope
@ REPL[3]:1
Hi, thanks for your work. Is the code above supposed to work? I'm not sure if imfilter! with the same source and destination is allowed. It works for kernels with 7.0 or smaller, but for bigger ones it fails.
julia> size(Kernel.gaussian(7.0)) # Doesn't throw.
(29, 29)
julia> size(Kernel.gaussian(7.01)) # Throws.
(33, 33)
Anyway, if the size is the problem perhaps a better error can be reported.
Thanks!
Hi, thanks for your work. Is the code above supposed to work? I'm not sure if
imfilter!with the same source and destination is allowed. It works for kernels with7.0or smaller, but for bigger ones it fails.Anyway, if the size is the problem perhaps a better error can be reported.
Thanks!
⌃ [6a3955dd] ImageFiltering v0.7.6