当前位置:网站首页>Opencv learning note 3 - image smoothing / denoising
Opencv learning note 3 - image smoothing / denoising
2022-07-07 08:23:00 【I am a little rice】
import cv2
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
from PIL import Image
image1 = mpimg.imread('image.png')
plt.imshow(image1);
1. Mean filtering
One 3×3 Convolution kernel , All values are 1
image2 = cv2.blur(image1, (3,3))
plt.imshow(image2)
2. Box filtering
there -1 Express , The number of input and output color channels is consistent
One 3×3 Convolution kernel , All values are 1
normalize Indicates whether the average is taken during convolution , by false Express , Sum only , exceed 255, Take... Directly 255
image3 = cv2.boxFilter(image1, -1, (3,3), normalize=False)
plt.imshow(image3);
3. Gauss filtering
Convolution kernel is not all 1 了 . But the value near the middle is larger
image4 = cv2.GaussianBlur(image1, (5,5), 1)
plt.imshow(image4)
4. median filtering
image5 = cv2.medianBlur(image1, 5)
plt.imshow(image5)
边栏推荐
- One click installation of highly available Nacos clusters in rainbow
- XCiT学习笔记
- Openjudge noi 2.1 1752: chicken and rabbit in the same cage
- Leetcode 187 Repeated DNA sequence (2022.07.06)
- SSM 整合
- ZCMU--1396: 队列问题(2)
- Infix keyword infix expression and the use of generic extension function in kotlin
- Standard function let and generic extension function in kotlin
- opencv学习笔记五——梯度计算/边缘检测
- Detailed explanation of apply, also, let, run functions and principle analysis of internal source code in kotlin
猜你喜欢
Interactive book delivery - signed version of Oracle DBA work notes
Uniapp mobile terminal forced update function
【无标题】
[quick start of Digital IC Verification] 10. Verilog RTL design must know FIFO
[IELTS speaking] Anna's oral learning records part2
Ebpf cilium practice (2) - underlying network observability
Deit learning notes
rsync远程同步
Basic use of CTF web shrink template injection nmap
Open3d ISS key points
随机推荐
Rainbow combines neuvector to practice container safety management
BiSeNet的特点
IP-guard助力能源企业完善终端防泄密措施,保护机密资料安全
积分商城管理系统中应包含的四大项
Ebpf cilium practice (2) - underlying network observability
[quick start of Digital IC Verification] 14. Basic syntax of SystemVerilog learning 1 (array, queue, structure, enumeration, string... Including practical exercises)
opencv学习笔记三——图像平滑/去噪处理
Use of out covariance and in inversion in kotlin
Pytoch (VI) -- model tuning tricks
MES system is a necessary choice for enterprise production
SSM 整合
探索STEAM艺术设计中的创造力
使用 Nocalhost 开发 Rainbond 上的微服务应用
What is the function of paralleling a capacitor on the feedback resistance of the operational amplifier circuit
Fast parsing intranet penetration escorts the document encryption industry
Rainbond 5.7.1 支持对接多家公有云和集群异常报警
Deit learning notes
opencv学习笔记二——图像基本操作
Practice of implementing cloud native Devops based on rainbow library app
单场带货涨粉10万,农村主播竟将男装卖爆单?