用cv2.BORDER_REPLICATE填充,重复最后一个像素,代码及效果:img2 = cv2.copyMakeBorder(img1,200,200,200,200,cv2.BORDER_REPLICATE...使用cv2.BORDER_REFLECT填充,边界元素的镜像:img3 = cv2.copyMakeBorder(img1,200,200,200,200,cv2.BORDER_REFLECT)?...用cv2.BORDER_REFLECT_101填充,跟cv2.BORDER_REFLECT类似:img3 = cv2.copyMakeBorder(img1,200,200,200,200,cv2.BORDER_REFLECT...用cv2.BORDER_WRAP填充:img5 = cv2.copyMakeBorder(img1,200,200,200,200,cv2.BORDER_WRAP)?...用cv2.BORDER_CONSTANT填充,添加一个指定值的边界,默认是黑色:img6 = cv2.copyMakeBorder(img1,10,10,10,10,cv2.BORDER_CONSTANT