JuliaImages / JuliaImages/ImageBase.jl
recursive `restrict` as pyramid
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 4
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
A second thought on https://github.com/JuliaImages/Images.jl/pull/971#issuecomment-910271594
gaussian_pyramid -> maybe ImageFiltering with new name build_pyramid and supports generic kernels. (EDIT @timholy: I don't think we can, gaussian_pyramid requires imresize from ImageTransformations. This might be a good candidate for remaining in Images.jl.)
It might be useful to define a more generic version of build_pyramid here with function f input.
# apply `f(restrict(img, dims))` recursively for `n_scales` times
build_pyramid(f=identity, img; dims::Dims, n_scales::Int)
# apply `f(restrict(img, dims))` recursively until `all(size(smallest_img) .< stop_size)` holds
build_pyramid(f=identity, img; stop_size)
When f(x) = imfilter(img, KernelFactors.IIRGaussian(sigma), NA()) then it becomes a gaussian pyramid.
The benefit is that we get a more generic version, and since we don't rely on either imresize or imfilter, we can keep this function in ImageBase.
FWIW, building pyramid also falls into the reduce diagram: build_pyramid(f, x::AbstractArray, n) = reduce((x,y)->push!(x, f(restrict(last(x)))), 1:n; init=[x])
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked ImageBase.jl discussion and the referenced ImageTransformations pull request comment, then examine the existing restrict entry point. Clarify whether build_pyramid belongs in ImageBase and which proposed signatures should be supported. Done means an agreed generic recursive pyramid API with coverage for the stated stopping conditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100