当前位置:网站首页>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);
边栏推荐
- ZCMU--1492: Problem D(C语言)
- MES系统,是企业生产的必要选择
- 雅思考试自己的复习进度以及方法使用【日更版】
- Rainbond 5.6 版本发布,增加多种安装方式,优化拓扑图操作体验
- Pytoch (VI) -- model tuning tricks
- Analysis of maker education in innovative education system
- 面试题(CAS)
- Rainbow combines neuvector to practice container safety management
- 积分商城管理系统中应包含的四大项
- Don't stop chasing the wind and the moon. Spring mountain is at the end of Pingwu
猜你喜欢
JS复制图片到剪切板 读取剪切板
Lua 编程学习笔记
BiSeNet的特点
[untitled]
[quick start of Digital IC Verification] 10. Verilog RTL design must know FIFO
Give full play to the wide practicality of maker education space
使用SwinUnet训练自己的数据集
Rainbow 5.7.1 supports docking with multiple public clouds and clusters for abnormal alarms
提高企业产品交付效率系列(1)—— 企业应用一键安装和升级
Qinglong panel - today's headlines
随机推荐
Improve the delivery efficiency of enterprise products (1) -- one click installation and upgrade of enterprise applications
GFS distributed file system
Detailed explanation of apply, also, let, run functions and principle analysis of internal source code in kotlin
[quick start of Digital IC Verification] 12. Introduction to SystemVerilog testbench (svtb)
offer收割机:两个长字符串数字相加求和(经典面试算法题)
Le système mes est un choix nécessaire pour la production de l'entreprise
BiSeNet的特点
Excel import function of jeesite form page
在 Rainbond 中一键安装高可用 Nacos 集群
Openvscode cloud ide joins rainbow integrated development system
[IELTS speaking] Anna's oral learning records Part3
Vulnerability recurrence fastjson deserialization
Using helm to install rainbow in various kubernetes
Learn how to compile basic components of rainbow from the source code
Golang 编译约束/条件编译 ( // +build <tags> )
藏书馆App基于Rainbond实现云原生DevOps的实践
面试题(CAS)
eBPF Cilium实战(1) - 基于团队的网络隔离
Register of assembly language by Wang Shuang
[quick start of Digital IC Verification] 13. SystemVerilog interface and program learning