I'm trying to run some examples from the documentation, such as the following:
using ImageSegmentation, TestImages
img = testimage("camera")
seg = fast_scanning(img, 0.1)
seg = prune_segments(seg, i->(segment_pixel_count(seg,i)<50), (i,j)->(-segment_pixel_count(seg,j)))
Unfortunately this returns the following error:
ERROR: MethodError: no method matching add_vertices!(::SimpleWeightedGraphs.SimpleWeightedGraph{Int64, Float64}, ::Int64)
Closest candidates are:
add_vertices!(::LightGraphs.AbstractGraph, ::Integer) at /Users/christopher/.julia/packages/LightGraphs/IgJif/src/core.jl:45
Stacktrace:
[1] region_adjacency_graph(s::SegmentedImage{Matrix{Int64}, ColorTypes.Gray{Float64}}, weight_fn::ImageSegmentation.var"#12#13")
@ ImageSegmentation ~/.julia/packages/ImageSegmentation/MX8ga/src/core.jl:109
[2] prune_segments(s::SegmentedImage{Matrix{Int64}, ColorTypes.Gray{Float64}}, is_rem::var"#1#3", diff_fn::var"#2#4")
@ ImageSegmentation ~/.julia/packages/ImageSegmentation/MX8ga/src/core.jl:221
[3] top-level scope
@ REPL[4]:1
Any ideas as to what might be going on here?
Julia version 1.6.4 on macOS 12.0.1.
I'm trying to run some examples from the documentation, such as the following:
Unfortunately this returns the following error:
Any ideas as to what might be going on here?
Julia version 1.6.4 on macOS 12.0.1.