1 | initial version |
you don't have an image, all you have there is the name of an image. what's missing is:
image = cv.imread(img) # you have to read it from disc first !
if (image == None):
print(img, "could not be read!")
cv.imshow("img", img)
cv.waitKey()
2 | No.2 Revision |
you don't have an image, all you have there is the name of an image. what's missing is:
image = cv.imread(img) cv.imread(imgpath) # you have to read it from disc first !
if (image == None):
print(img, print(imgpath, "could not be read!")
cv.imshow("img", img)
cv.imshow("image", image)
cv.waitKey()
3 | No.3 Revision |
you don't have an image, all you have there is the name of an image. what's missing is:
image = cv.imread(imgpath) # you have to read it from disc first !
if (image == None):
print(imgpath, "could not be read!")
return # can't go on with an invalid image
cv.imshow("image", image)
cv.waitKey()