当前位置:网站首页>Opencv learning note 4 - expansion / corrosion / open operation / close operation
Opencv learning note 4 - expansion / corrosion / open operation / close operation
2022-07-07 08:23:00 【I am a little rice】
1. corrosion
effect : Depilation point
image1 = mpimg.imread('./11.png')
plt.imshow(image1);

kernel = np.ones((3, 3), np.uint8)
image2 = cv2.erode(image1, kernel, iterations = 1)
plt.imshow(image2)

2. inflation
The result of corrosion , As the input of inflation , It can make small things bigger .
kernel = np.ones((3, 3), np.uint8)
image3 = cv2.dilate(image2, kernel, iterations = 1)
plt.imshow(image3)

3. Open operation
Corrosion before expansion
image = mpimg.imread('11.png')
kernel = np.ones((3,3), np.uint8)
image1 = cv2.morphologyEx(image, cv2.MORPH_OPEN, kernel)
plt.imshow(image1);

4. Closed operation
Expand before corrode
image = mpimg.imread('11.png')
kernel = np.ones((3,3), np.uint8)
image1 = cv2.morphologyEx(image, cv2.MORPH_CLOSE, kernel)
plt.imshow(image1);

边栏推荐
- Analysis of maker education in innovative education system
- Full text query classification
- Automatic upgrading of database structure in rainbow
- Qinglong panel -- Huahua reading
- It's too true. There's a reason why I haven't been rich
- JS复制图片到剪切板 读取剪切板
- Pvtv2--pyramid vision transformer V2 learning notes
- 利用 Helm 在各类 Kubernetes 中安装 Rainbond
- MES system is a necessary choice for enterprise production
- [quick start of Digital IC Verification] 12. Introduction to SystemVerilog testbench (svtb)
猜你喜欢

Application of slip ring of shipborne radar antenna

Caractéristiques de bisenet

漏洞複現-Fastjson 反序列化

Low success rate of unit test report

Rainbond 5.6 版本发布,增加多种安装方式,优化拓扑图操作体验

DeiT学习笔记

使用SwinUnet训练自己的数据集
![[untitled]](/img/b5/348b1d8b5d34cf10e715522b9871f2.png)
[untitled]

归并排序和非比较排序

Rainbow version 5.6 was released, adding a variety of installation methods and optimizing the topology operation experience
随机推荐
在 Rainbond 中一键安装高可用 Nacos 集群
Improve the delivery efficiency of enterprise products (1) -- one click installation and upgrade of enterprise applications
One click installation of highly available Nacos clusters in rainbow
Using helm to install rainbow in various kubernetes
Understanding of out covariance, in inversion and invariance in kotlin
[quick start of Digital IC Verification] 11. Introduction to Verilog testbench (VTB)
Coquette data completes the cloud native transformation through rainbow to realize offline continuous delivery to customers
Transformation function map and flatmap in kotlin
ZCMU--1492: Problem D(C语言)
grpc、oauth2、openssl、双向认证、单向认证等专栏文章目录
buureservewp(2)
JS复制图片到剪切板 读取剪切板
The use of generics and vararg variable parameters in kotlin
Xcit learning notes
雅思考试自己的复习进度以及方法使用【日更版】
使用SwinUnet训练自己的数据集
opencv学习笔记五——梯度计算/边缘检测
Caractéristiques de bisenet
[untitled]
Snyk 依赖性安全漏洞扫描工具