JuliaImages / ImageFiltering.jl

Julia implementations of multidimensional array convolution and nonlinear stencil operations
Other
99 stars 49 forks source link

imgradients documentation is confusing #211

Open alok opened 3 years ago

alok commented 3 years ago

if i try to do

imgradients(testimage("chelsea"))

i get

MethodError: no method matching imgradients(::Array{RGB{Normed{UInt8,8}},2})
Closest candidates are:
  imgradients(::AbstractArray, !Matched::Function) at ~/.julia/packages/ImageFiltering/nipv3/src/specialty.jl:500
  imgradients(::AbstractArray, !Matched::Function, !Matched::Any) at ~/.julia/packages/ImageFiltering/nipv3/src/specialty.jl:500

the documentation seems to suggest that this should work?

ashwani-rathee commented 3 years ago

Hey @alok , Can you provide the link to which part creates confusion? You would need to specify the filtering kernel,the error handler shows what you need for the imgradient to work properly It's well documented here :https://juliaimages.org/ImageFiltering.jl/stable/function_reference/#ImageFiltering.imgradients

Example would be

    imgradients(img, kernelfun=KernelFactors.ando3)