我正在尝试使用带有 ImageSegmentation.jl 的模糊 C 均值聚类来聚类图像的不同区域
using ImageSegmentation, Images
fl = load("flower.jpg")
fuzzy_fl = fuzzy_cmeans(fl,3,2)
它给出了这样的错误:
MethodError: no method matching fuzzy_cmeans(::Base.ReshapedArray{Float64,2,ImageCore.ChannelView{Float64,3,Array{ColorTypes.RGB4{Float64},2}},Tuple{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64}}})
Closest candidates are:
fuzzy_cmeans(::Array{T<:Real,2}, ::Int64, ::Real; maxiter, tol, dist_metric, display) where T<:Real at /Users/asharma19/.julia/v0.6/Clustering/src/fuzzycmeans.jl:58
fuzzy_cmeans(::AbstractArray{T<:ColorTypes.Colorant,N}, ::Any...; kwargs...) where {T<:ColorTypes.Colorant, N} at /Users/asharma19/.julia/v0.6/ImageSegmentation/src/clustering.jl:12
1)我应该如何输入图像到这个功能?2)另外,如果它工作正常,因为该函数不返回 SegmentedImage 数组,那之后我应该如何显示分段/聚类图像?