{"action":"closed","issue":{"url":"https://api.github.com/repos/JuliaImages/ImageFiltering.jl/issues/82","repository_url":"https://api.github.com/repos/JuliaImages/ImageFiltering.jl","labels_url":"https://api.github.com/repos/JuliaImages/ImageFiltering.jl/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/JuliaImages/ImageFiltering.jl/issues/82/comments","events_url":"https://api.github.com/repos/JuliaImages/ImageFiltering.jl/issues/82/events","html_url":"https://github.com/JuliaImages/ImageFiltering.jl/issues/82","id":377380455,"node_id":"MDU6SXNzdWUzNzczODA0NTU=","number":82,"title":"`imfilter` with `KernelFactors.IIRGaussian()` and `OffsetArray` causes bounds error","user":{"login":"zygmuntszpak","id":14922863,"node_id":"MDQ6VXNlcjE0OTIyODYz","avatar_url":"https://avatars2.githubusercontent.com/u/14922863?v=4","gravatar_id":"","url":"https://api.github.com/users/zygmuntszpak","html_url":"https://github.com/zygmuntszpak","followers_url":"https://api.github.com/users/zygmuntszpak/followers","following_url":"https://api.github.com/users/zygmuntszpak/following{/other_user}","gists_url":"https://api.github.com/users/zygmuntszpak/gists{/gist_id}","starred_url":"https://api.github.com/users/zygmuntszpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zygmuntszpak/subscriptions","organizations_url":"https://api.github.com/users/zygmuntszpak/orgs","repos_url":"https://api.github.com/users/zygmuntszpak/repos","events_url":"https://api.github.com/users/zygmuntszpak/events{/privacy}","received_events_url":"https://api.github.com/users/zygmuntszpak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-05T12:32:37Z","updated_at":"2018-11-13T11:50:11Z","closed_at":"2018-11-13T11:50:11Z","author_association":"MEMBER","body":"```julia\r\nusing Images, TestImages, ImageFiltering, OffsetArrays\r\n\r\nimg1 = Gray{Float64}.(testimage(\"mandrill\"))\r\nimg2 = OffsetArray(img1, 3, 0)\r\nsigma = 1.0\r\nN = 2\r\nkerng = KernelFactors.IIRGaussian(sigma)\r\nkern = ntuple(d->kerng, Val(N))\r\n\r\n# Error\r\nimg_smoothed_main = imfilter(img2, kern, NA())\r\n```\r\n\r\nThe error is:\r\n```julia\r\njulia> img_smoothed_main = imfilter(img2, kern, NA())\r\nERROR: BoundsError: attempt to access Base.Slice{UnitRange{Int64}} with indices 4:515 at index [1:3]\r\nStacktrace:\r\n [1] throw_boundserror(::Base.Slice{UnitRange{Int64}}, ::Tuple{UnitRange{Int64}}) at ./abstractarray.jl:492\r\n [2] checkbounds at ./abstractarray.jl:457 [inlined]\r\n [3] getindex at ./indices.jl:302 [inlined]\r\n [4] _imfilter_dim!(::ComputationalResources.CPU1{ImageFiltering.Algorithm.IIR}, ::OffsetArray{Gray{Float64},2,Array{Gray{Float64},2}}, ::OffsetArray{Gray{Float64},2,Array{Gray{Float64},2}}, ::ImageFiltering.KernelFactors.TriggsSdika{Float64,3,3,9}, ::CartesianIndices{0,Tuple{}}, ::Base.Slice{UnitRange{Int64}}, ::CartesianIndices{1,Tuple{Base.Slice{UnitRange{Int64}}}}, ::Fill{Gray{Float64},0}) at /home/zygmunt/.julia/packages/ImageFiltering/bMda8/src/imfilter.jl:1306\r\n [5] _imfilter_inplace_tuple! at /home/zygmunt/.julia/packages/ImageFiltering/bMda8/src/imfilter.jl:1269 [inlined]\r\n [6] imfilter!(::ComputationalResources.CPU1{ImageFiltering.Algorithm.IIR}, ::OffsetArray{Gray{Float64},2,Array{Gray{Float64},2}}, ::OffsetArray{Gray{Float64},2,Array{Gray{Float64},2}}, ::Tuple{ImageFiltering.KernelFactors.TriggsSdika{Float64,3,3,9},ImageFiltering.KernelFactors.TriggsSdika{Float64,3,3,9}}, ::Fill{Gray{Float64},0}) at /home/zygmunt/.julia/packages/ImageFiltering/bMda8/src/imfilter.jl:1226\r\n [7] imfilter_na_separable! at /home/zygmunt/.julia/packages/ImageFiltering/bMda8/src/imfilter.jl:1448 [inlined]\r\n [8] _imfilter_na!(::ComputationalResources.CPU1{ImageFiltering.Algorithm.IIR}, ::OffsetArray{Gray{Float64},2,Array{Gray{Float64},2}}, ::OffsetArray{Gray{Float64},2,Array{Gray{Float64},2}}, ::Tuple{ImageFiltering.KernelFactors.TriggsSdika{Float64,3,3,9},ImageFiltering.KernelFactors.TriggsSdika{Float64,3,3,9}}, ::NA{0}) at /home/zygmunt/.julia/packages/ImageFiltering/bMda8/src/imfilter.jl:676\r\n [9] imfilter! at /home/zygmunt/.julia/packages/ImageFiltering/bMda8/src/imfilter.jl:663 [inlined]\r\n [10] imfilter!(::OffsetArray{Gray{Float64},2,Array{Gray{Float64},2}}, ::OffsetArray{Gray{Float64},2,Array{Gray{Float64},2}}, ::Tuple{ImageFiltering.KernelFactors.TriggsSdika{Float64,3,3,9},ImageFiltering.KernelFactors.TriggsSdika{Float64,3,3,9}}, ::NA{0}, ::ImageFiltering.Algorithm.IIR) at /home/zygmunt/.julia/packages/ImageFiltering/bMda8/src/imfilter.jl:612\r\n [11] imfilter at /home/zygmunt/.julia/packages/ImageFiltering/bMda8/src/imfilter.jl:606 [inlined]\r\n [12] imfilter(::OffsetArray{Gray{Float64},2,Array{Gray{Float64},2}}, ::Tuple{ImageFiltering.KernelFactors.TriggsSdika{Float64,3,3,9},ImageFiltering.KernelFactors.TriggsSdika{Float64,3,3,9}}, ::NA{0}) at /home/zygmunt/.julia/packages/ImageFiltering/bMda8/src/imfilter.jl:5\r\n [13] top-level scope at none:0\r\n```"}}
{"actor":{"display_login":"timholy"}}