Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions machine-learning/hog-feature-extraction/hog.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#creating hog features
fd, hog_image = hog(resized_img, orientations=9, pixels_per_cell=(8, 8),
cells_per_block=(2, 2), visualize=True, multichannel=True)
cells_per_block=(2, 2), visualize=True, channel_axis=-1)
print(fd.shape)
print(hog_image.shape)
plt.axis("off")
Expand All @@ -28,4 +28,4 @@

# save the images
plt.imsave("resized_img.jpg", resized_img)
plt.imsave("hog_image.jpg", hog_image, cmap="gray")
plt.imsave("hog_image.jpg", hog_image, cmap="gray")