Skip to content

unseeded_region_growing does not accept array of Real while seeded does #92

@aramirezreyes

Description

@aramirezreyes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions