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

Bucket extraction for HoG is wrong #2

Open
edubois opened this issue Oct 6, 2018 · 0 comments
Open

Bucket extraction for HoG is wrong #2

edubois opened this issue Oct 6, 2018 · 0 comments

Comments

@edubois
Copy link

edubois commented Oct 6, 2018

FYI, I think there is a mistake in your code:

grad_bucket(x, y) = cast<int>(round((atan2(y, x) * B / (float)M_PI))) % B;

This can be negative,
Shouldn't you add 2 * PI to the value atan result when it's negative and do a modulo pi?

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

1 participant