You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the create_descriptor functions for FREAK and BRISK, the sampled_intensities array is declared with the same type of the input image, but it should be declared with the same type as the integral image of the input image.
For some images I'm working with, it leads to the following error:
julia>using Images, ImageFeatures
img =load("test_image.png")
img1 =Gray.(img)::Matrix{Gray{N0f8}}
feats_1 =Features(fastcorners(img1, 20, 0.5))
brisk_params =BRISK()
desc_1, ret_feats_1 =create_descriptor(img1, feats_1, brisk_params)
nothing
ERROR: ArgumentError: element type N0f8 is an 8-bit type representing 256 values from 0.0 to 1.0,
but the values (1.0034722f0,) do not lie within this range.
See the READMEs for FixedPointNumbers and ColorTypes for more information.
Stacktrace:
[1] throw_colorerror_(#unused#::Type{N0f8}, values::Tuple{Float32})
@ ColorTypes ~/.julia/packages/ColorTypes/1dGw6/src/types.jl:686
[2] throw_colorerror(#unused#::Type{Gray{N0f8}}, values::Tuple{Float32})
@ ColorTypes ~/.julia/packages/ColorTypes/1dGw6/src/types.jl:736
[3] checkval
@ ~/.julia/packages/ColorTypes/1dGw6/src/types.jl:648 [inlined]
[4] Gray
@ ~/.julia/packages/ColorTypes/1dGw6/src/types.jl:359 [inlined]
[5] _convert
@ ~/.julia/packages/ColorTypes/1dGw6/src/conversions.jl:96 [inlined]
[6] cconvert
@ ~/.julia/packages/ColorTypes/1dGw6/src/conversions.jl:76 [inlined]
[7] convert
@ ~/.julia/packages/ColorTypes/1dGw6/src/conversions.jl:73 [inlined]
[8] push!
@ ./array.jl:1060 [inlined]
[9] create_descriptor(img::Matrix{Gray{N0f8}}, features::Vector{Feature}, params::BRISK)
@ ImageFeatures ~/.julia/dev/ImageFeatures/src/brisk.jl:95
[10] top-level scope
@ REPL[1]:6
Here is the test image, to reproduce the issue if needed:
In the
create_descriptor
functions for FREAK and BRISK, thesampled_intensities
array is declared with the same type of the input image, but it should be declared with the same type as the integral image of the input image.For some images I'm working with, it leads to the following error:
Here is the test image, to reproduce the issue if needed:
The fix could be to replace
ImageFeatures.jl/src/brisk.jl
Line 92 in 5c277fd
by
The text was updated successfully, but these errors were encountered: