mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-27 11:27:08 +08:00
Removed unused code.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user