当前位置:网站首页>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)

边栏推荐
- Caractéristiques de bisenet
- grpc、oauth2、openssl、双向认证、单向认证等专栏文章目录
- The use of generics and vararg variable parameters in kotlin
- Pytoch (VI) -- model tuning tricks
- It's too true. There's a reason why I haven't been rich
- The truth of robot education in hands-on practice
- 柯基数据通过Rainbond完成云原生改造,实现离线持续交付客户
- 数据中台落地实施之法
- Zcmu--1492: problem d (C language)
- Game attack and defense world reverse
猜你喜欢

Qinglong panel - today's headlines

Rainbow 5.7.1 supports docking with multiple public clouds and clusters for abnormal alarms
![[quick start of Digital IC Verification] 13. SystemVerilog interface and program learning](/img/d8/ffc1b7527f0269cecb2946ab402a2e.png)
[quick start of Digital IC Verification] 13. SystemVerilog interface and program learning
![[quick start of Digital IC Verification] 14. Basic syntax of SystemVerilog learning 1 (array, queue, structure, enumeration, string... Including practical exercises)](/img/60/011b3ccdffa978d691436449a99e10.png)
[quick start of Digital IC Verification] 14. Basic syntax of SystemVerilog learning 1 (array, queue, structure, enumeration, string... Including practical exercises)

Practice of implementing cloud native Devops based on rainbow library app

拓维信息使用 Rainbond 的云原生落地实践

Pvtv2--pyramid vision transformer V2 learning notes

解析创新教育体系中的创客教育

BiSeNet的特点

Vulnerability recurrence easy_ tornado
随机推荐
Game attack and defense world reverse
[step on the pit series] H5 cross domain problem of uniapp
Transformation function map and flatmap in kotlin
Avatary's livedriver trial experience
Make LIVELINK's initial pose consistent with that of the mobile capture actor
[IELTS speaking] Anna's oral learning records part2
Leetcode medium question my schedule I
Application of slip ring of shipborne radar antenna
The use of generics and vararg variable parameters in kotlin
Deit learning notes
Zcmu--1396: queue problem (2)
MES系統,是企業生產的必要選擇
通俗易懂单点登录SSO
Battery and motor technology have received great attention, but electric control technology is rarely mentioned?
漏洞複現-Fastjson 反序列化
Lua programming learning notes
opencv学习笔记四——膨胀/腐蚀/开运算/闭运算
Tuowei information uses the cloud native landing practice of rainbow
使用BiSeNet实现自己的数据集
Practice of implementing cloud native Devops based on rainbow library app