I am following this tutorial on OpenCV, where the tutorial uses the following code:
import argparse
import imutils
import cv2
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True, help="path to input image")
args = vars(ap.parse_args())
image = cv2.imread(args["image"])
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
thresh = cv2.threshold(gray, 255, 255, cv2.THRESH_BINARY_INV)[1]
cv2.imshow("Thresh", thresh)
cv2.waitKey()
Yet the image thresh displays as a blank window with a light grey background, where the tutorial is supposed to shoe a monochrome profile of an image that came with the tutorial source code.
I'm using the same code, and the same input image, yet the tutorial tells me to expect a monochrome image showing object outlines, while I only get a blank, grey image. What could be wrong here?

