The implementation of Python imutils filling image with black surrounding

Time:2020-6-24

code


import imutils
import cv2
image = cv2.imread('') 
# translate the image x=25 pixels to the right and y=75 pixels up
translated = imutils.translate(image, -75, 75)
cv2.imshow('original image',image)
cv2.imshow('translated',translated)
cv2.waitKey(0)

effect

reference resources: https://github.com/jrosebr1/imutils

The implementation of the above Python imutils fill image with black surrounding is the whole content shared by the editor. I hope to give you a reference, and I hope you can support developepaer more.