If I have an image like below, how can I add border all around the image such that the overall height and width of the final image increases but the height and width of the
Add border using openCV
import cv2 white = [255,255,255] img1 = cv2.imread('input.png') constant= cv2.copyMakeBorder(img1,20,20,20,20,cv2.BORDER_CONSTANT,value=white) cv2.imwrite('output.png',constant)