基于HOG的人脸识别算法
image=io.imread("Hu ge.png")
image=color.rgb2gray(image)
#将一维转为可用于显示的二维
arr,hog_image=hog(image,visualise=True) #添加该参数可设置图像更加细腻orientations=4
fig,(ax1,ax2)=plt.subplots(1,2, figsize=(8,4))
ax1.imshow(image,cmap=plt.cm.gray)
ax2.imshow(hog_image,cmap=plt.cm.gray)
plt.show()
image=io.imread("Hu ge.png")
image=color.rgb2gray(image)
#将一维转为可用于显示的二维
arr,hog_image=hog(image,visualise=True,orientations=4) #添加该参数可设置图像更加细腻orientations=4
fig,(ax1,ax2)=plt.subplots(1,2, figsize=(8,4))
ax1.imshow(image,cmap=plt.cm.gray)
ax2.imshow(hog_image,cmap=plt.cm.gray)
plt.show()
相关文章
gitHub