From 78cf5a0f9a2af8c5cbf41711a92c85a77cbab582 Mon Sep 17 00:00:00 2001 From: Korijn van Golen Date: Tue, 16 Jun 2015 09:40:04 +0200 Subject: [PATCH] Removed unused code. --- skimage/feature/_hog.py | 5 +---- skimage/feature/_hoghistogram.pyx | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/skimage/feature/_hog.py b/skimage/feature/_hog.py index 98ffb32d..877117bb 100644 --- a/skimage/feature/_hog.py +++ b/skimage/feature/_hog.py @@ -103,9 +103,6 @@ def hog(image, orientations=9, pixels_per_cell=(8, 8), cell are used to vote into the orientation histogram. """ - magnitude = np.hypot(gx, gy) - orientation = np.arctan2(gy, gx) * (180 / np.pi) % 180 - sy, sx = image.shape cx, cy = pixels_per_cell bx, by = cells_per_block @@ -117,7 +114,7 @@ def hog(image, orientations=9, pixels_per_cell=(8, 8), orientation_histogram = np.zeros((n_cellsy, n_cellsx, orientations)) _hoghistogram.hog_histograms(gx, gy, cx, cy, sx, sy, n_cellsx, n_cellsy, - visualise, orientations, orientation_histogram) + orientations, orientation_histogram) # now for each cell, compute the histogram hog_image = None diff --git a/skimage/feature/_hoghistogram.pyx b/skimage/feature/_hoghistogram.pyx index 76ad2add..cec180f7 100644 --- a/skimage/feature/_hoghistogram.pyx +++ b/skimage/feature/_hoghistogram.pyx @@ -62,7 +62,7 @@ def hog_histograms(cnp.float64_t[:, :] gx, int cx, int cy, int sx, int sy, int n_cellsx, int n_cellsy, - int visualise, int orientations, + int orientations, cnp.float64_t[:, :, :] orientation_histogram): """Extract Histogram of Oriented Gradients (HOG) for a given image. @@ -84,8 +84,6 @@ def hog_histograms(cnp.float64_t[:, :] gx, Number of cells (x). n_cellsy : int Number of cells (y). - visualise : int - Also return an image of the HOG. orientations : int Number of orientation bins. orientation_histogram : ndarray