当前位置:网站首页>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);
边栏推荐
- Ebpf cilium practice (1) - team based network isolation
- MES系統,是企業生產的必要選擇
- Qinglong panel - today's headlines
- 发挥创客教育空间的广泛实用性
- rsync远程同步
- opencv学习笔记五——梯度计算/边缘检测
- Four items that should be included in the management system of integral mall
- 使用 Nocalhost 开发 Rainbond 上的微服务应用
- Bayes' law
- 打通法律服务群众“最后一公里”,方正璞华劳动人事法律自助咨询服务平台频获“点赞”
猜你喜欢
eBPF Cilium实战(1) - 基于团队的网络隔离
Caractéristiques de bisenet
Quick analysis of Intranet penetration helps the foreign trade management industry cope with a variety of challenges
The largest 3 same digits in the string of leetcode simple question
[quick start of Digital IC Verification] 11. Introduction to Verilog testbench (VTB)
Wang Zijian: is the NFT of Tencent magic core worth buying?
Rainbow 5.7.1 supports docking with multiple public clouds and clusters for abnormal alarms
[step on the pit series] H5 cross domain problem of uniapp
使用BiSeNet实现自己的数据集
【无标题】
随机推荐
Using helm to install rainbow in various kubernetes
The simple problem of leetcode is to judge whether the number count of a number is equal to the value of the number
云原生存储解决方案Rook-Ceph与Rainbond结合的实践
The largest 3 same digits in the string of leetcode simple question
Snyk 依赖性安全漏洞扫描工具
Automatic upgrading of database structure in rainbow
解析机器人科技发展观对社会研究论
Use of any superclass and generic extension function in kotlin
Rainbond 5.6 版本发布,增加多种安装方式,优化拓扑图操作体验
归并排序和非比较排序
GFS分布式文件系统
[go ~ 0 to 1] obtain timestamp, time comparison, time format conversion, sleep and timer on the seventh day
漏洞复现-Fastjson 反序列化
Zcmu--1492: problem d (C language)
Battery and motor technology have received great attention, but electric control technology is rarely mentioned?
Improve the delivery efficiency of enterprise products (1) -- one click installation and upgrade of enterprise applications
What is the function of paralleling a capacitor on the feedback resistance of the operational amplifier circuit
Transformation function map and flatmap in kotlin
JS复制图片到剪切板 读取剪切板
opencv学习笔记五——梯度计算/边缘检测