I am trying to cluster different regions of an image using Fuzzy C-means clustering with ImageSegmentation.jl
using ImageSegmentation, Images
fl = load("flower.jpg")
fuzzy_fl = fuzzy_cmeans(fl,3,2)
It gives an error like this:
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) How should I input an image to this function? 2) Also, if it works fine, as the function does not return a SegmentedImage array, how should I display a segmented/clustered image after that?