From 8ab6e63e75852c36772c6f4793277b30528ac3c7 Mon Sep 17 00:00:00 2001 From: Korijn van Golen Date: Tue, 16 Jun 2015 09:36:02 +0200 Subject: [PATCH] Removed unused import, applied pep8 formatting and corrected a method call that should have been refactored. --- skimage/feature/_hog.py | 6 +++--- skimage/feature/_hoghistogram.pyx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/skimage/feature/_hog.py b/skimage/feature/_hog.py index 40175066..98ffb32d 100644 --- a/skimage/feature/_hog.py +++ b/skimage/feature/_hog.py @@ -1,8 +1,8 @@ import numpy as np -from scipy.ndimage import uniform_filter from .._shared.utils import assert_nD from . import _hoghistogram + def hog(image, orientations=9, pixels_per_cell=(8, 8), cells_per_block=(3, 3), visualise=False, normalise=False): """Extract Histogram of Oriented Gradients (HOG) for a given image. @@ -116,8 +116,8 @@ def hog(image, orientations=9, pixels_per_cell=(8, 8), # compute orientations integral images 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) + _hoghistogram.hog_histograms(gx, gy, cx, cy, sx, sy, n_cellsx, n_cellsy, + visualise, 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 4d3e2dfe..76ad2add 100644 --- a/skimage/feature/_hoghistogram.pyx +++ b/skimage/feature/_hoghistogram.pyx @@ -117,7 +117,7 @@ def hog_histograms(cnp.float64_t[:, :] gx, x = cx / 2 while x < cx2: - orientation_histogram[yi, xi, i] = CellHog(magnitude, + orientation_histogram[yi, xi, i] = cell_hog(magnitude, orientation, ori1, ori2, cx, cy, x, y, sx, sy) xi += 1 x += cx