def getImage():
current_image = []
naoImage = camProxy.getImageRemote(nameId)
Width = naoImage[0]
Height = naoImage[1]
array = naoImage[6]
image = Image.fromstring("RGB", (Width, Height), array)
current_image = np.array(image)
current_image = cv2.cvtColor(current_image, cv2.COLOR_RGB2GRAY)
current_image = cv2.resize(current_image, (img_size, img_size))
return current_image
# encode the image using the VAE
评论列表
文章目录