【发布时间】:2019-05-23 18:00:27
【问题描述】:
我收到此代码的错误:
import matplotlib.pyplot as plt
import cv2
import numpy as np
black = np.zeros(shape = (512, 512, 3), dtype = np.int64)
cv2.circle(black, center = (100, 100), radius = 50, color = (0, 255, 0), thickness = 10)
plt.imshow(black)
在结果中,黑色图像上应打印一个绿色圆圈。但我得到了
TypeError: 输出数组
img的布局不兼容cv::Mat (step[ndims-1] != elemsize or step[1] != elemsize*nchannels)
【问题讨论】:
标签: python-3.x opencv error-handling compiler-errors jupyter-notebook