JuliaImages / JuliaImages/ImageSegmentation.jl

unseeded_region_growing does not accept array of Real while seeded does

Open
#92 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
45
Forks
22
PR merge metrics
No merged PRs in 30d

Description

unseeded_region_growing does not work with an array of numbers. It requires an array of Colorant. On the other hand, the seeded_region_growing counterpart does work.

The solution seems pretty simple, would a PR be welcome or are there reasons why this is not desirable?

using ImageSegmentation
a = zeros(10,10)
a[3:3,3:3] .= 1
unseeded_region_growing(a, 0.1)
MethodError: no method matching unseeded_region_growing(::Matrix{Float64}, ::Float64)

Closest candidates are:
  unseeded_region_growing(::AbstractArray, ::Real, ::Vector{Int64})
   @ ImageSegmentation deprecated.jl:103
  unseeded_region_growing(::AbstractArray, ::Real, ::Vector{Int64}, ::Function)
   @ ImageSegmentation deprecated.jl:103
  unseeded_region_growing(::AbstractArray{CT, N}, ::Real) where {CT<:ColorTypes.Colorant, N}
   @ ImageSegmentation ~/.julia/packages/ImageSegmentation/oFzSR/src/region_growing.jl:235
  ...


Stacktrace:
 [1] top-level scope
   @ In[63]:4

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

Start with the reproduction in the issue, then inspect src/region_growing.jl around line 235 and compare unseeded_region_growing with its seeded counterpart. Confirm the current failure for a Matrix{Float64}; done means unseeded_region_growing accepts the shown array while retaining the existing Colorant behavior.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.