From aa51a715586d713c682da5157d3a68a0aaf9a53e Mon Sep 17 00:00:00 2001 From: Robert Blackwell Date: Sat, 5 Oct 2024 17:38:14 -0400 Subject: [PATCH] bugfix: angle was incorrectly shifted in scalar mode --- src/hog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hog.cpp b/src/hog.cpp index e7eca47..ff9da93 100644 --- a/src/hog.cpp +++ b/src/hog.cpp @@ -206,7 +206,7 @@ void magnitude_orientation_impl(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]); } }