JuliaImages / JuliaImages/ImageFeatures.jl
brief.jl:There is an error in the range
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 49
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
I think there was an error in brief.jl, the default value range of rand() is [0,1), so I think in the random_unfiorm function, rand() should be changed to (rand().-0.5) * 2
julia> brief_params = BRIEF(sampling_type = random_uniform)
BRIEF{typeof(random_uniform)}(128, 9, 1.4142135623730951, ImageFeatures.random_uniform, 123)
julia> brief_params.window # window = 9, so the value of CartesianIndex should in [-4:4]
9
julia> B = brief_params.sampling_type(brief_params.size, brief_params.window, brief_params.seed) # All values of the index are positive and in [0:4].
(CartesianIndex{2}[CartesianIndex(4, 3), CartesianIndex(2, 1), CartesianIndex(0, 1), CartesianIndex(2, 3), CartesianIndex(2, 1), CartesianIndex(1, 3), CartesianIndex(4, 0), CartesianIndex(4, 2), CartesianIndex(4, 1), CartesianIndex(4, 4) … CartesianIndex(2, 0), CartesianIndex(2, 4), CartesianIndex(1, 1), CartesianIndex(3, 4), CartesianIndex(3, 1), CartesianIndex(4, 4), CartesianIndex(1, 1), CartesianIndex(2, 3), CartesianIndex(1, 0), CartesianIndex(3, 3)], CartesianIndex{2}[CartesianIndex(1, 3), CartesianIndex(0, 2), CartesianIndex(2, 0), CartesianIndex(2, 1), CartesianIndex(1, 2), CartesianIndex(3, 1), CartesianIndex(3, 2), CartesianIndex(3, 2), CartesianIndex(0, 2), CartesianIndex(1, 2) … CartesianIndex(1, 2), CartesianIndex(2, 0), CartesianIndex(2, 4), CartesianIndex(1, 4), CartesianIndex(0, 2), CartesianIndex(1, 0), CartesianIndex(0, 2), CartesianIndex(4, 3), CartesianIndex(3, 1), CartesianIndex(0, 1)])
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect brief.jl and locate the random_uniform function described in the issue. Verify whether its generated CartesianIndex values should cover the symmetric [-4:4] range, then confirm the corrected behavior with the existing project checks or a focused Julia reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100