Skip to content

Commit

Permalink
bugfix: angle was incorrectly shifted in scalar mode
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwer committed Oct 5, 2024
1 parent 455b2b6 commit aa51a71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void magnitude_orientation_impl<double>(const double *__restrict gx, const doubl
for (int i = 0; i < N; ++i) {
magnitude[i] = sqrt(gx[i] * gx[i] + gy[i] * gy[i]);
orientation[i] = atan2(gy[i], gx[i]);
orientation[i] = scale_factor * (orientation[i] < 0 ? orientation[i] : orientation[i] + shift);
orientation[i] = scale_factor * (orientation[i] < 0 ? orientation[i] + shift : orientation[i]);
}
}

Expand Down

0 comments on commit aa51a71

Please sign in to comment.