当前位置:网站首页>Opencv image processing Laplace pyramid
Opencv image processing Laplace pyramid
2022-07-23 20:49:00 【yuesichiu】
Laplacian pyramid is mainly used to reconstruct images , Laplace is just to enlarge the image , You can predict the residuals , What is residual , When a small image is enlarged , You need to insert some pixel values , What is inserted directly above is 0, Laplacian pyramid algorithm can predict according to the surrounding pixels , So as to achieve the maximum restoration of the image .
I learned that the principle is as follows : Using every layer of the Gaussian pyramid , Subtracting the prediction image after the upper layer image is sampled and Gaussian convoluted , A series of difference images are obtained LP Decompose the image ( among LP It's the Laplacian pyramid image ).
There is also a formula for Laplace ( This is the first time in this series to write formulas ), among L For the Laplacian pyramid image ,G For Gaussian pyramid images

import cv2 as cv
src = cv.imread("./lena.jpg")
print(src.shape[:2])
cv.imshow("src image", src)
# Down sampling 1 Time
PyrDown1 = cv.pyrDown(src)
print(PyrDown1.shape[:2])
cv.imshow("PyrDown1", PyrDown1)
# Down sampling 2 Time
PyrDown2 = cv.pyrDown(PyrDown1)
print(PyrDown2.shape[:2])
cv.imshow("PyrDown2", PyrDown2)
# Sampling up 1 Time
pyrUp1 = cv.pyrUp(PyrDown2)
print(pyrUp1.shape[:2])
cv.imshow("pyrUp1", pyrUp1)
# Calculating Laplacian pyramid image
# sampling 1 Time - Sampling up 1 The next graph
laplace = PyrDown1 - pyrUp1
cv.imshow("laplace", laplace)
cv.waitKey()

边栏推荐
- Cesium 获取经纬度的几种方法
- 最小生成树:Kruskal
- Vrrp+mstp configuration details [Huawei ENSP experiment]
- 视觉slam学习|基础篇01
- 【Scratch画图100例】图46-scratch绘制花朵 少儿编程 scratch编程画图案例教程 考级比赛画图集训案例
- OpenLayers实例-Animated GIF-GIF动画
- LU_ASR01语音模块使用
- MySQL's past and present life, Hello, MySQL
- Lingo basic use
- Read the five flow indicators of R & D efficiency insight
猜你喜欢

Stm32c8t6 driving lidar actual combat (II)
![[kernel] platform bus model for driving development and learning](/img/69/f600e4e6173491955ab90e92577450.png)
[kernel] platform bus model for driving development and learning

TROPOMI(哨兵5P)数据介绍及下载方法

Quick connect selection recommendation: what are the potential opportunities in the Korean market?

使用TinkerPop框架对GDB增删改查

视觉slam学习|基础篇01

-2021最新对比学习(Contrastive Learning)相关必读论文整理分享

NLP领域历史最全必读经典论文分类整理分享(附中文解析)

Choice is greater than effort! Guiyang campus Xiaoge 0 foundation successfully transferred to software testing and gained 12K!

Solve the problem that the user clicks quickly and repeats the request within 1 second
随机推荐
高数下|三重积分的计算1|高数叔|手写笔记
Stm32c8t6 driving lidar actual combat (II)
【创建 Birthday Card 应用】
解决1秒钟内,用户快速点击,重复请求的问题
WinDbg实践--入门篇
The instructions on Microsoft website about opening or closing smartscreen in edge browser are incorrect
[force deduction] sum of three numbers
深入浅出边缘云 | 1. 概述
2022.7.11mySQL作业
A beautiful road
[Yunxiang book club No. 13] Chapter V ffmpeg common methods for viewing media information and processing audio and video files
微软网站上关于在Edge浏览器中打开或关闭smartScreen的说明有误
【isprint函数判断字符是否可输出】
【云驻共创】天天写SQL,你遇到了哪些神奇的特性?
OpenLayers实例-Animated GIF-GIF动画
From which dimensions can we judge the quality of code? How to have the ability to write high-quality code?
Jetson nano烧录踩坑记(一定可以解决你的问题)
【pdd面试】分析手机中的应用(相机)的活跃情况
Educational codeforces round 132 A-D problem solution
Go to the square for dinner