Removed unused import, applied pep8 formatting and corrected a method call

that should have been refactored.
This commit is contained in:
Korijn van Golen
2015-06-16 09:36:02 +02:00
parent c37fc9ec20
commit 8ab6e63e75
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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