当前位置:网站首页>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);
边栏推荐
- 使用SwinUnet训练自己的数据集
- opencv学习笔记三——图像平滑/去噪处理
- Use of JMeter
- 探索STEAM艺术设计中的创造力
- Give full play to the wide practicality of maker education space
- Complex network modeling (III)
- Transformation function map and flatmap in kotlin
- Automatic upgrading of database structure in rainbow
- Uniapp mobile terminal forced update function
- Open3D ISS关键点
猜你喜欢
Ebpf cilium practice (1) - team based network isolation
Golang 编译约束/条件编译 ( // +build <tags> )
单元测试报告成功率低
Interpreting the practical application of maker thinking and mathematics curriculum
Leetcode simple question: find the K beauty value of a number
Excel import function of jeesite form page
opencv学习笔记三——图像平滑/去噪处理
[quick start of Digital IC Verification] 14. Basic syntax of SystemVerilog learning 1 (array, queue, structure, enumeration, string... Including practical exercises)
电池、电机技术受到很大关注,反而电控技术却很少被提及?
一文了解如何源码编译Rainbond基础组件
随机推荐
[quick start of Digital IC Verification] 12. Introduction to SystemVerilog testbench (svtb)
Réplication de vulnérabilité - désrialisation fastjson
Rainbond 5.6 版本发布,增加多种安装方式,优化拓扑图操作体验
面试题(CAS)
opencv学习笔记四——膨胀/腐蚀/开运算/闭运算
【无标题】
Avatary's livedriver trial experience
使用SwinUnet训练自己的数据集
Obsidan之数学公式的输入
IELTS review progress and method use [daily revision]
雅思考试自己的复习进度以及方法使用【日更版】
Complex network modeling (II)
Caractéristiques de bisenet
MES system is a necessary choice for enterprise production
The use of generics and vararg variable parameters in kotlin
Four items that should be included in the management system of integral mall
Qinglong panel - today's headlines
Vulnerability recurrence easy_ tornado
MES系統,是企業生產的必要選擇
Famine cloud service management script