Python imutils 填充图片周边为黑色的实现
作者:何以问天涯 时间:2021-04-13 04:06:32
代码
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)
效果
参考:https://github.com/jrosebr1/imutils
来源:https://blog.csdn.net/u011463646/article/details/77429457
标签:Python,imutils,图片周边,黑色
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
浅谈图表参数化设计
2010-08-29 18:03:00
![](https://img.aspxhome.com/file/UploadPic/20108/29/01-56s.jpg)
Python+Opencv实现表格边框线检测
2023-08-11 04:55:14
![](https://img.aspxhome.com/file/2023/1/61971_0s.png)
一个修改Oracle数据库用户密码的小诀窍
2009-09-30 15:29:00
python程序 线程队列queue使用方法解析
2021-11-16 18:43:02
关于Flask 上下文详细介绍
2023-12-10 01:52:32
![](https://img.aspxhome.com/file/2023/7/85087_0s.png)
SQL Server数据库备份出错及应对措施
2009-04-20 17:02:00
PHP的Yii框架中行为的定义与绑定方法讲解
2023-07-21 20:42:33
如何拒绝同一张表单被多次提交?
2009-12-16 18:46:00
详解Python垃圾回收机制和常量池的验证
2022-12-28 09:58:29
oracle删除表字段和oracle表增加字段
2023-07-16 10:52:18
开发心得--写给想学Javascript朋友的一点经验之谈
2009-02-25 11:42:00
Python IDE Pycharm中的快捷键列表用法
2022-12-12 19:21:12
![](https://img.aspxhome.com/file/2023/5/86615_0s.png)
Javascript优化五大原则
2007-10-30 13:49:00
Python用dilb提取照片上人脸的示例
2021-07-04 23:34:47
![](https://img.aspxhome.com/file/2023/0/66410_0s.png)
perl哈希hash的常见用法介绍
2023-08-12 18:46:59
人民币的符号的正确表示法?一杠?两杠?¥还是¥呢?
2010-03-24 12:21:00
python使用tcp传输图片数据
2023-08-09 06:33:48
![](https://img.aspxhome.com/file/2023/6/86616_0s.jpg)
如何使用ASP实现网站的“目录树”管理
2008-06-13 06:39:00
Gradio机器学习模型快速部署工具接口状态
2023-08-11 13:36:27
![](https://img.aspxhome.com/file/2023/7/62847_0s.png)
PyCharm配置KBEngine快速处理代码提示冲突、配置命令问题
2023-08-12 09:14:28
![](https://img.aspxhome.com/file/2023/4/64654_0s.png)