【发布时间】:2020-12-25 07:47:37
【问题描述】:
eu estou com um problema para pixelizar as imagens em escala de cinza da webcam em tempo real e transformar em uma martiz。 Segue o codigo
'''导入 cv2 导入matplotlib
捕获 = cv2.VideoCapture(0) x=0 而(真):
ret, frame = capture.read()
grayFrame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imshow('video gray', grayFrame)
cv2.imshow('video original', frame)
print(grayFrame)
w, h = (16, 16)
temp = cv2.resize(input, (w, h), interpolation=cv2.INTER_LINEAR)
cv2.imshow('video original', output)
if cv2.waitKey(1) == 27:
break'''
【问题讨论】: