Removed unused code.

This commit is contained in:
Korijn van Golen
2015-06-16 09:40:04 +02:00
parent 8ab6e63e75
commit 78cf5a0f9a
2 changed files with 2 additions and 7 deletions
+1 -4
View File
@@ -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
+1 -3
View File
@@ -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