from skimage import io, color
from skimage.feature import hog
import matplotlib.pyplot as plt
path = 'C:/Users/liky/Desktop/Face/westbrook.jpg'
image = io.imread(path)
image = color.rgb2gray(image)
arr, hog_image = hog(image, visualise=True, orientations=9, block_norm='L2-Hys')
plt.subplot(1, 2, 1)
plt.imshow(image, cmap=plt.cm.gray)
plt.subplot(1, 2, 2)
plt.imshow(hog_image, cmap=plt.cm.gray)
plt.show()
HOG ( scikit-image )
猜你喜欢
转载自blog.csdn.net/li_k_y/article/details/87032977
今日推荐
周排行