我想使用带有边界值的warpAffine函数
cv2.warpAffine(image, rot_mat, image.shape[1::-1], flags=cv2.INTER_LINEAR, borderMode=cv2.BORDER_CONSTANT, borderValue=(129,172,138))
他工作得很好
但这是:
color = (129,172,138)
cv2.warpAffine(image, rot_mat, image.shape[1::-1], flags=cv2.INTER_LINEAR, borderMode=cv2.BORDER_CONSTANT, borderValue=color)
不起作用了。。。我得到:
{error}OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function 'warpAffine'
> Overload resolution failed:
> - Scalar value for argument 'borderValue' is not numeric
> - Scalar value for argument 'borderValue' is not numeric
我真的不明白。。。你能帮我吗
目前没有回答
相关问题 更多 >
编程相关推荐