NameError: name 'WINDOW_NORMAL' is not defined

cv2.namedWindow('image:',WINDOW_NORMAL)
cv2.resizeWindow('image:',960,540)
cv2.imshow('image:',image)

NameError: name 'WINDOW_NORMAL' is not defined错误

解决方法,WINDOW_NORMAL应该是cv2.WINDOW_NORMAL

修改为

cv2.namedWindow('image:',cv.WINDOW_NORMAL)
cv2.resizeWindow('image:',960,540)
cv2.imshow('image:',image)

即可

你可能感兴趣的:(opencv,opencv)