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)

 

你可能感兴趣的:(python基础,opencv,计算机视觉,python)