from matplotlib import pyplot as plt
import numpy as np
import argparse
import cv2
#构造参数解析器并解析参数
**ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required = True, help = "Path to the image")
args = vars(ap.parse_args())**
#加载图片并显示
image = cv2.imread(args["image"])
cv2.imshow("image", image)**
我的错误是:
usage: -c [-h] -i IMAGE
-c: error: argument **-i/--image is required**
如果这是我当前的wd:C:\ Users \ Jeremy \ Documents \ IPython笔记本
有什么不对?我应该为-i / - image输入什么?