问题遇到的现象和发生背景
pycharm运行,用的是anaconda的环境,库都有,但在pycharm中打代码后运行出现这个问题,求解决:
Traceback (most recent call last):
File "E:\my_Project\test.py", line 6, in
img_mix = cv2.addWeighted(img1, 0.6, img2, 0.4, 0)
cv2.error: OpenCV(3.4.2) C:\projects\opencv-python\opencv\modules\core\src\arithm.cpp:659: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function 'cv::arithm_op'