📜  用零填充像素 python opencv - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:16.815000             🧑  作者: Mango

代码示例1
x = y = 30
w = h = 100

mask = np.zeros(img.shape[:2],np.uint8)
mask[y:y+h,x:x+w] = 255
res = cv2.bitwise_and(img,img,mask = mask)