JuliaImages / JuliaImages/ImageFiltering.jl

mapwindow with border option not implemented?

Open
#175 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
104
Forks
52
PR merge metrics
No merged PRs in 30d

Description

The following works:

using ImageFiltering

A = zeros(10,10,10)

mapwindow(sum, A, (3,1,1))

but the following doesn't:

mapwindow(sum, A, (3,1,1), border=Pad(:reflect,2,0,0))

ERROR: MethodError: no method matching resolve_border(::Pad{3})
Closest candidates are:
  resolve_border(::AbstractString) at /Users/julio.hoffimann@ibm.com/.julia/packages/ImageFiltering/eH8Od/src/mapwindow.jl:130
  resolve_border(::Union{NA, NoPad, Union{Inner{0}, Fill{T,0}, Pad{0}} where T}) at /Users/julio.hoffimann@ibm.com/.julia/packages/ImageFiltering/eH8Od/src/mapwindow.jl:131

I need to get it working, so I will check the codebase to try contribute a fix. If you have alternative suggestions to get things moving, please let me know. This is for a project with some tight deadlines.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failing mapwindow example with Pad(:reflect,2,0,0), then inspect src/mapwindow.jl around resolve_border at line 130 and the mapwindow entry point. Confirm the supported border behavior and verify that the example no longer raises a MethodError.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.