2020
09-27
09-27
解决Opencv+Python cv2.imshow闪退问题
Opencv+Pythoncv2.imshow闪退#读入原始图像origineImage=cv2.imread('./pic/6.jpeg')#图像灰度化#image=cv2.imread('test.jpg',0)image=cv2.cvtColor(origineImage,cv2.COLOR_BGR2GRAY)#image.save('./pic/gray.jpg')cv2.imshow('gray',image)#将图片二值化retval,img=cv2.threshold(image,127,255,cv2.THRESH_BINARY_INV)cv2.imshow('binary',img)程序运行到这,图片闪退,在cv.imshow()后加入cv...
继续阅读 >