Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying to run the HOG example #47

Closed
abhijithch opened this issue Dec 4, 2017 · 3 comments
Closed

Error while trying to run the HOG example #47

abhijithch opened this issue Dec 4, 2017 · 3 comments

Comments

@abhijithch
Copy link

abhijithch commented Dec 4, 2017

I am trying to run the example here, after following the mentioned instructions. However I am running into the following error,

ERROR: BoundsError: attempt to access 9×16×8 Array{Float64,3} at index [10, 1, 1]
Stacktrace:
 [1] trilinear_interpolate!(::Array{Float64,3}, ::Float64, ::Float64, ::Int64, ::CartesianIndex{2}, ::Int64, ::Int64, ::Int64, ::Int64, ::Int64) at /Users/abhijith/.julia/v0.6/ImageFeatures/src/hog.jl:160

In the following iterator in hog.jl,

for i in R
        trilinear_interpolate!(hist, mag[i], phase[i], orientations, i, cell_size, Int(cell_rows), Int(cell_cols), rows, cols)
end

the error pops for i=CartesianIndex{2}((6, 1)). I tried with Gray.(img) too with the same problem.

@abhijithch
Copy link
Author

The issue I think is this line bin_θ1 = floor(Int, θ*orientations/180) + 1 when the phase >= 180 the value bin_θ1 is computed as 10, where as we have only 9 bins.

@simonbyrne
Copy link

This seems to have been fixed since the last release: can you tag a new one?

@simonbyrne
Copy link

Were you able to tag a new version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants