测量图像尺寸示例编译出错请教。
在支行这段程序时,出错,# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True,
help="path to the input image")
ap.add_argument("-w", "--width", type=float, required=True,
help="width of the left-most object in the image (in inches)")
args = vars(ap.parse_args())
提示信息:
Python 3.7.1rc2 (v3.7.1rc2:6c06ef7dc3, Oct 13 2018, 15:44:37) [MSC v.1914 64 bit (AMD64)] on ZXBUSE, Standard
>>> usage: celiang.py [-h] -i IMAGE -w WIDTH
celiang.py: error: the following arguments are required: -i/--image, -w/--width
请教这是出什么问题了?怎么改正?