我在数组之间进行元素明智的乘法运算时遇到了一些问题。我说他们没有对齐或没有广播到形状。请帮助我
import PIL
from PIL import Image
import numpy as np
import cv2
image = cv2.imread ('/Applications/Python 3.7/Input/1.jpg', 1)
b,g,r = cv2.split(image)
res = b - r
ret = res[res < 26]
kernel = np.ones((9, 9))
mask = cv2.dilate(ret, kernel,iterations=1)
r = np.dot(r, mask)
g = np.dot(g, mask)
b = np.dot(b, mask)