网络编程
位置:首页>> 网络编程>> Python编程>> Python imutils 填充图片周边为黑色的实现

Python imutils 填充图片周边为黑色的实现

作者:何以问天涯  发布时间:2021-04-13 04:06:32 

标签:Python,imutils,图片周边,黑色

代码


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)

效果

Python imutils 填充图片周边为黑色的实现

参考:https://github.com/jrosebr1/imutils

来源:https://blog.csdn.net/u011463646/article/details/77429457

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com