Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
始终获取此错误(需要以下参数:-i/--image)_Image_Python 3.5 - Fatal编程技术网

始终获取此错误(需要以下参数:-i/--image)

始终获取此错误(需要以下参数:-i/--image),image,python-3.5,Image,Python 3.5,构造参数parse并解析参数,并且alaways具有相同的错误 from __future__ import print_function from skimage.feature import peak_local_max from skimage.morphology import watershed from scipy import ndimage import argparse import cv2 什么是“相同的错误”?您可以共享确切的错误消息吗?删除了一些标记此错误:需要以下参数

构造参数parse并解析参数,并且alaways具有相同的错误

from __future__ import print_function
from skimage.feature import peak_local_max
from skimage.morphology import watershed
from scipy import ndimage
import argparse
import cv2

什么是“相同的错误”?您可以共享确切的错误消息吗?删除了一些标记此错误:需要以下参数:-i/--image
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True,
help="path to input image")
args = vars(ap.parse_args())

image = cv2.imread(args["C:/Users/Wael/Desktop/coins.jpg"])
shifted = cv2.pyrMeanShiftFiltering(image, 21, 51)
cv2.imshow("Input", image)