-2
# Read in the image
from google.colab import drive
drive.mount('/gdrive')
filepath='gdrive/MyDrive/image.png'
image = cv2.imread(filepath)
print(type(image))

运行此程序时,我得到 Class "NoneType" 。我在从驱动器读取图像文件失败的地方。请纠正我。

4

1 回答 1

1

我认为图像路径应该是开头带有斜线的绝对路径。( '/gdrive/MyDrive/image.png')。

于 2021-08-23T07:10:38.670 回答