boxFilter関数を使用すると、次のエラーが発生します。
SystemError: new style getargs format but argument is not a tuple
コードスニプレットは次のとおりです。
//After downloading image from url, I process it as follows
imgcv = cv2.cvtColor(np.asarray(im), cv.CV_RGB2YCrCb)
#Get the channel 0
imgcv1 = cv2.split(imgcv)[0]
cv2.boxFilter(imgcv1, 1, 7, data, (1,1), 0, cv2.BORDER_DEFAULT)
議論はタプルではないと言っています。タプルにする方法は?たくさん検索してみましたが、役に立たなかったです。私はopenCVとPythonの初心者です。フィルタの定義は次のとおりです。
cv2.boxFilter(src, ddepth, ksize[, dst[, anchor[, normalize[, borderType]]]]) → dst
Parameters:
src – Source image.
dst – Destination image of the same size and type as src .
ksize – Smoothing kernel size.
anchor – Anchor point. The default value Point(-1,-1) means that the anchor is at the kernel center.
normalize – Flag specifying whether the kernel is normalized by its area or not.
borderType – Border mode used to extrapolate pixels outside of the image.
前もって感謝します。