最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Python imutils填充图片周边为黑色如何实现 Python imutils填充图片周边为黑色实现代码
时间:2020-01-19 编辑:袖梨 来源:一聚教程网
本篇文章小编给大家分享一下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)
效果
相关文章
- Golang ProtoBuf的基本语法详解 10-20
- Python识别MySQL中的冗余索引解析 10-20
- Python+Pygame绘制小球代码展示 10-18
- Python中的数据精度问题介绍 10-18
- Python随机值生成的常用方法介绍 10-18
- python3解压缩.gz文件分析 09-27