Layout of the output array img is incompatible with cv::Mat

Layout of the output array img is incompatible with cv::Mat

cv2.circle函数报错,解决方法,前面加上代码:

'''修改后的'''
b, g, r = cv2.split(new_image1)
new_image1 = cv2.merge([r, g, b])

后面就可以运行了: 

# cv2.imshow('222', new_image1)
# cv2.waitKey(5000)
# cv2.destroyAllWindows()

cv2.circle(new_image1, (int(x_y[0]), int(x_y[1])), 2, (0, 0, 255), -1)

猜你喜欢

转载自blog.csdn.net/jacke121/article/details/128462988
IMG