当前位置:网站首页>图像二值化处理
图像二值化处理
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位 |
边栏推荐
- tag动态规划-刷题预备知识-2. 0-1背包理论基础和二维数组解法模板
- 如何将应用加入到deviceidle 白名单?
- Binary search-2
- 数字签名论述及生成与优点分析
- Tencent qianzhiming: Exploration and application of pre training methods in information flow business
- Map和List<Map>转相应的对象
- 在国金证券开户怎么样?开户安全吗?
- pycharm如何修改多行注释快捷键
- Connected to surface test questions
- How pycharm modifies multiline annotation shortcuts
猜你喜欢
Data Encryption Standard DES security
next(iter(dataloader))的一点点体会
RSA encryption and decryption details
wechat_ Solve the problem of page Jump and parameter transfer by navigator in wechat applet
DoS及攻击方法详解
Properties file garbled
解决pycharm里面每个字母占一格空格的问题
How sparksql returns a specific day of the week by date -dayofweek function
Ethereum技术架构介绍
9、智慧交通项目(2)
随机推荐
深层次安全定义剖析及加密技术
KDD 2022 | how to use comparative learning in cross domain recommendation?
用redis做用户访问数据统计HyperLogLog及Bitmap高级数据类型
wechat_微信小程序中解决navigator进行页面跳转并传递参数问题
Detailed explanation of dos and attack methods
Plt How to keep show() not closed
Tsinghua & Shangtang & Shanghai AI & CUHK proposed Siamese image modeling, which has both linear probing and intensive prediction performance!
In and exceptions, count (*) query optimization
pycharm的plt.show()如何保持不关闭
Dos et détails de la méthode d'attaque
[dynamic planning] Jianzhi offer II 091 Paint the house
next(iter(dataloader))的一点点体会
同花顺开户怎么样安全吗?怎么炒股开户
wechat_ Solve the problem of page Jump and parameter transfer by navigator in wechat applet
(必须掌握的多线程知识点)认识线程,创建线程,使用Thread的常见方法及属性,以及线程的状态和状态转移的意义
Chinese (Simplified) language pack
How pycharm modifies multiline annotation shortcuts
pycharm如何修改多行注释快捷键
新手炒股开户选哪个证券公司比较好?怎样炒股比较安全??
LM06丨仅用成交量构造抄底摸顶策略的奥秘