Skip to content

Commit

Permalink
Normalize hog_image to fit dtype_limits
Browse files Browse the repository at this point in the history
  • Loading branch information
sciunto committed Aug 27, 2016
1 parent 3f18414 commit ec7a4ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions skimage/feature/_hog.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def hog(image, orientations=9, pixels_per_cell=(8, 8),
int(centre[0] + dx),
int(centre[1] - dy))
hog_image[rr, cc] += orientation_histogram[y, x, o]
# Normalize to ensure that values fit in dtype_limits
hog_image /= hog_image.max()

# The fourth stage computes normalisation, which takes local groups of

Expand Down

0 comments on commit ec7a4ae

Please sign in to comment.