Skip to content

Commit

Permalink
Removed unused import, applied pep8 formatting and corrected a method…
Browse files Browse the repository at this point in the history
… call

that should have been refactored.
  • Loading branch information
Korijn committed Jun 16, 2015
1 parent c37fc9e commit 8ab6e63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions skimage/feature/_hog.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skimage/feature/_hoghistogram.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ab6e63

Please sign in to comment.