python 实现图片融合
Python 实现 图片 融合
2023-09-27 14:29:08 时间
python 实现图片融合
import cv2
import numpy as np
# Read image
img = cv2.imread("../paojie.jpg").astype(np.float32)
H, W, C = img.shape
img2 = cv2.imread("../bird.png").astype(np.float32)
img = cv2.resize(img,img2.shape[:2])
# 设置权重
a = 0.6
out = img * a + img2 * (1 - a)
out = out.astype(np.uint8)
# Save result
cv2.imwrite("out.jpg", out)
cv2.imshow("result", out)
cv2.waitKey(0)
cv2.destroyAllWindows()
相关文章
- Python中的单例模式的几种实现方式的及优化
- 【正则】详解python正则表达式之re.group()用法
- python svm原理和实现,svm相关算法
- 考虑梯水电站群的水火电节能调度(Python代码实现)
- 改进的多目标差分进化算法在电力系统环境经济调度中的应用(Python代码实现)【电气期刊论文复现】
- Python实现128-ECB 解密
- 基于Python的仓库库存管理系统的设计和实现
- 第36天:Python calendar 模块 category: python
- python使用token验证,通过api上传图片到图床 EasyImages2.0
- Selenium + PhantomJS + python 简单实现爬虫的功能
- 数据分析基础:数据可视化+数据分析报告(Python实现)
- Python:cmd传参
- 字符型图片验证码识别完整过程及Python实现
- Python人工智能之图片识别,Python3一行代码实现图片文字识别
- Python实现RabbitMQ中6种消息模型
- Python 和 C++实现 九九乘法表
- 使用python删除word文档中的指定段落,顺便实现一下文档中的图片导出
- python的exec
- 第11.2节 Python 正则表达式支持函数概览
- 第9.4节 Python中用readline读取二进制文件方式打开文件
- 使用python写appium用例
- Opencv-python滤镜系列(3): 凹透镜滤镜效果实现
- uiautomator +python 实现安卓自动化
- Python 到底能干嘛?—次学会Python所有开发技能
- Python写了个疫情信息快速查看工具(附源码)
- python实现图书管理系统(超详细)
- Python - 简单实现SOCKS5-dailifuwuqi
- Python的PIL库实现验证码图片