From f78d10c099de66686eb83357502494d266145e57 Mon Sep 17 00:00:00 2001 From: Colin Lea Date: Thu, 17 Jan 2013 11:36:59 -0500 Subject: [PATCH] Swapped the direection that the histograms point in the hog visualisation --- skimage/feature/_hog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skimage/feature/_hog.py b/skimage/feature/_hog.py index ce7db462..8e8ea7f2 100644 --- a/skimage/feature/_hog.py +++ b/skimage/feature/_hog.py @@ -142,8 +142,8 @@ def hog(image, orientations=9, pixels_per_cell=(8, 8), centre = tuple([y * cy + cy // 2, x * cx + cx // 2]) dx = radius * cos(float(o) / orientations * np.pi) dy = radius * sin(float(o) / orientations * np.pi) - rr, cc = draw.bresenham(centre[0] - dy, centre[1] - dx, - centre[0] + dy, centre[1] + dx) + rr, cc = draw.bresenham(centre[0] - dx, centre[1] - dy, + centre[0] + dx, centre[1] + dy) hog_image[rr, cc] += orientation_histogram[y, x, o] """