opencv-图像融合(高斯金字塔,拉普拉斯金字塔)

目标:两张图片自然结合无边界

使用传统numpy 直接将两张图片分开并拼接hstack,会有明显边界
使用Gaussian Pyramids 和 Laplacian Pyramids 结合两张图

  • 步骤:
  1. Load the two images of apple and orange
  2. Find the Gaussian Pyramids for apple and orange (level6)
  3. From Gaussian Pyramids .find their Laplacian Pyramids
  4. Now join the left half of apple and right half of orange in each levels of Laplacian Pyramids
  5. Finally from this joint image pyramids,reconstruct the original image

** 图片是opencv官方下载的图片库**
可以先看看浅墨写的[OpenCV图像金字塔](https://blog.csdn.net/poem_qianmo/article/details/26157633)


import numpy as np
import cv2 as cv
# laod images

apple = cv.imread(r"C:\Users\amy\Desktop\OpenCV\opencv-master\samples\data\apple.jpg")
orange = cv.imread(r"C:\Users\amy\Desktop\OpenCV\opencv-master\samples\data\orange.jpg")

pr
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值