当前位置:网站首页>图像二值化处理
图像二值化处理
2022-06-26 18:07:00 【Maccy37】
图像二值化将图像上像素点的灰度值设置为0或255,(0显示黑色,255显示白色)在数字图像处理中,二值图像占有非常重要的地位,图像的二值化使图像中数据量大为减少,从而能凸显出目标的轮廓。OpenCV中提供了函数cv::threshold();
CV_EXPORTS_W double threshold( InputArray src,
OutputArray dst,
double thresh,
double maxval,
int type );src:源图像,可以为8位的灰度图,也可以为32位的彩色图像。(两者由区别)
dst:输出图像
thresh:阈值
maxval:dst图像中最大值(图像超过阈值被设置的像素)
type:阈值类型,可以具体类型如下:
| 编号 | 阈值类型枚举 | 注意 |
| 1 | THRESH_BINARY |
|
| 2 | THRESH_BINARY_INV |
|
| 3 | THRESH_TRUNC |
|
| 4 | THRESH_TOZERO |
|
| 5 | THRESH_TOZERO_INV |
|
| 6 | THRESH_MASK | 不支持 |
| 7 | THRESH_OTSU | 不支持32位 |
| 8 | THRESH_TRIANGLE | 不支持32位 |

边栏推荐
- How does Guosen Securities open an account? Is it safe to open a stock account through the link
- Uncover the secret of Agora lipsync Technology: driving portraits to simulate human speech through real-time voice
- How about opening an account at Guojin securities? Is it safe?
- 如何将应用加入到deviceidle 白名单?
- Detailed explanation of MySQL mvcc mechanism
- Several key points in divorce agreement
- Please advise tonghuashun which securities firm to choose for opening an account? Is it safe to open an account online now?
- pycharm如何修改多行注释快捷键
- 让torch.cuda.is_available()从false变成true的一点经验
- RSA加密解密详解
猜你喜欢

无需人工先验!港大&同济&LunarAI&旷视提出基于语义分组的自监督视觉表征学习,显著提升目标检测、实例分割和语义分割任务!

深入理解MySQL锁与事务隔离级别

Deep understanding of MySQL lock and transaction isolation level

CD-CompactDisk

MySQL add column failed because there was data before, not null by default

(必须掌握的多线程知识点)认识线程,创建线程,使用Thread的常见方法及属性,以及线程的状态和状态转移的意义

数字签名论述及生成与优点分析

The king of Internet of things protocol: mqtt

清华&商汤&上海AI&CUHK提出Siamese Image Modeling,兼具linear probing和密集预测性能!

带你解决哈希冲突,并实现一个简单hash表,
随机推荐
同花顺开户怎么样安全吗?怎么炒股开户
[buuctf.reverse] 126-130
vutils. make_ A little experience of grid () in relation to black and white images
Properties file garbled
Prometeus 2.34.0 new features
How about opening an account at Guojin securities? Is it safe to open an account?
MySQL的MVCC机制详解
[buuctf.reverse] 126-130
小程序设置按钮分享功能
Decision tree and random forest
No manual prior is required! HKU & Tongji & lunarai & Kuangshi proposed self supervised visual representation learning based on semantic grouping, which significantly improved the tasks of target dete
接水面试题
JVM入個門(1)
Temporarily turn off MySQL cache
17.13 supplementary knowledge, thread pool discussion, quantity discussion and summary
tag动态规划-刷题预备知识-2. 0-1背包理论基础和二维数组解法模板
Comp281 explanation
Binary search-2
in和exsits、count(*)查询优化
In and exceptions, count (*) query optimization