【发布时间】:2019-06-04 22:56:35
【问题描述】:
image = imread(r"sampleimage.jpg")
show_img(image)
NameError: name 'show_img' is not defined.
请告诉我为什么会这样?
【问题讨论】:
-
您的代码中没有名为
show_img的方法。您可能想要导入它。
image = imread(r"sampleimage.jpg")
show_img(image)
NameError: name 'show_img' is not defined.
请告诉我为什么会这样?
【问题讨论】:
show_img 的方法。您可能想要导入它。
我希望你通过查看你的代码来使用 opencv
import cv2
image = cv2.imread("sampleimage.jpg")
cv2.imshow('image',image)
cv2.waitKey(0)
【讨论】: