当前位置:网站首页>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)
边栏推荐
- 一种适用于应用频繁测试下快速查看Pod的日志的方法(grep awk xargs kuberctl)
- 利用 Helm 在各类 Kubernetes 中安装 Rainbond
- GFS分布式文件系统
- eBPF Cilium实战(2) - 底层网络可观测性
- eBPF Cilium实战(1) - 基于团队的网络隔离
- ROS bridge notes (05) - Carla_ ackermann_ Control function package (convert Ackermann messages into carlaegovehiclecontrol messages)
- Pvtv2--pyramid vision transformer V2 learning notes
- Complete linear regression manually based on pytoch framework
- Transformation function map and flatmap in kotlin
- [quick start of Digital IC Verification] 14. Basic syntax of SystemVerilog learning 1 (array, queue, structure, enumeration, string... Including practical exercises)
猜你喜欢
漏洞複現-Fastjson 反序列化
PVTV2--Pyramid Vision TransformerV2学习笔记
BiSeNet的特点
Lua 编程学习笔记
Leetcode simple question: find the K beauty value of a number
Wang Zijian: is the NFT of Tencent magic core worth buying?
Battery and motor technology have received great attention, but electric control technology is rarely mentioned?
在Rainbond中实现数据库结构自动化升级
Rainbow 5.7.1 supports docking with multiple public clouds and clusters for abnormal alarms
Rainbond结合NeuVector实践容器安全管理
随机推荐
The reified keyword in kotlin is used for generics
BiSeNet的特點
Splunk查询csv lookup table数据动态查询
通俗易懂单点登录SSO
Application of slip ring of shipborne radar antenna
Detailed explanation of apply, also, let, run functions and principle analysis of internal source code in kotlin
一文了解如何源码编译Rainbond基础组件
电池、电机技术受到很大关注,反而电控技术却很少被提及?
Leetcode simple question: find the K beauty value of a number
Avatary's livedriver trial experience
rsync远程同步
Rainbow 5.7.1 supports docking with multiple public clouds and clusters for abnormal alarms
Battery and motor technology have received great attention, but electric control technology is rarely mentioned?
Openjudge noi 2.1 1752: chicken and rabbit in the same cage
Pvtv2--pyramid vision transformer V2 learning notes
单场带货涨粉10万,农村主播竟将男装卖爆单?
Offer harvester: add and sum two long string numbers (classic interview algorithm question)
解析机器人科技发展观对社会研究论
解析创新教育体系中的创客教育
CTF-WEB shrine模板注入nmap的基本使用