# 填充
for i in range(height):
for j in range(width):
img_blank[i][blank_start+j] = img[d.top()+i][d.left()+j]
# 调整图像
blank_start += width
cv2.namedWindow("img_faces", 2)
cv2.imshow("img_faces", img_blank)
cv2.waitKey(0)
结果:
图3 原图和处理后得到的图像窗口