I tried to find the hog features using Get HOG image features from OpenCV + Python?
but whenever I run the below stub, it causes my user session to log out and when I login back to os, then all the windows are closed.
import cv2
img=cv2.imread('Figure_1.png')
print(img.shape)
img=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
hog=cv2.HOGDescriptor()
m=hog.compute(img)
print(img.shape)
cv2.imshow('hog',m)
cv2.waitKey()
cv2.DestroyAllWindows()
Can somebody please tell why I am witnessing this behaviour and any suggestions, if the code is buggy.