img = rand(RGB{N0f8}, 100, 100)
canny(img, (Percentile(80), Percentile(20)))
Gives a
ERROR: MethodError: no method matching canny(::Array{Gray{Normed{UInt8,8}},2})
Stacktrace:
[1] canny(::Array{RGB{Normed{UInt8,8}},2}, ::Tuple{Percentile{Int64},Percentile{Int64}}) at Images/7FSUM/src/edge.jl:410
Seems this code just needs to forward the threshold argument:
|
canny(img::AbstractMatrix, threshold::Tuple{N,N}, args...) where {N<:Union{NumberLike,Percentile{NumberLike}}} = |
|
canny(convert(Array{Gray}, img), args...) |
i.e. canny(convert(Array{Gray}, img), threshold, args...) though a warning suggests that maybe it should be canny(Gray.(img), threshold, args...)
Gives a
Seems this code just needs to forward the
thresholdargument:Images.jl/src/edge.jl
Lines 410 to 411 in 3951d87
i.e.
canny(convert(Array{Gray}, img), threshold, args...)though a warning suggests that maybe it should becanny(Gray.(img), threshold, args...)