Skip to content

Instantly share code, notes, and snippets.

@missflash
Last active March 25, 2019 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save missflash/e040bf8ae14abec32525e8e87c01aabc to your computer and use it in GitHub Desktop.
Save missflash/e040bf8ae14abec32525e8e87c01aabc to your computer and use it in GitHub Desktop.
pip install scikit-image
# Edge Detection
import skimage
image = skimage.data.camera()
edges = skimage.filter.sobel(image)
# HOG (Histogram of Oriented Gradient)
image = skimage.color.rgb2gray(skimage.data.astronaut())
skimage.feature.hog(image, orientations=9, pixels_per_cell=(8, 8), cells_per_block=(3, 3), visualise=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment