当前位置:网站首页>图像二值化处理
图像二值化处理
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位 |

边栏推荐
- [code Capriccio - dynamic planning] t583. Deleting two strings
- Niuke network: Design LRU cache structure design LFU cache structure
- 接水面试题
- 我想知道,我在肇庆,到哪里开户比较好?网上开户是否安全么?
- 让torch.cuda.is_available()从false变成true的一点经验
- MySQL add column failed because there was data before, not null by default
- How pycharm modifies multiline annotation shortcuts
- 股票开账户如何优惠开户?现在在线开户安全么?
- Analysis of deep security definition and encryption technology
- wechat_ Solve the problem of page Jump and parameter transfer by navigator in wechat applet
猜你喜欢

数据加密标准(DES)概念及工作原理

transforms.RandomCrop()的输入只能是PIL image 不能是tensor

二分查找法-1

Plt How to keep show() not closed

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

pycharm如何修改多行注释快捷键

Connected to surface test questions

Vscode usage - Remote SSH configuration description

LeetCode——226. 翻转二叉树(BFS)

Case study of row lock and isolation level
随机推荐
MySQL exports all table indexes in the database
Temporarily turn off MySQL cache
新手炒股开户选哪个证券公司比较好?怎样炒股比较安全??
Runtimeerror: CUDA error: out of memory own solution (it is estimated that it is not applicable to most people in special circumstances)
数字签名标准(DSS)
Solve the problem that each letter occupies a space in pycharm
手写promise.all
MySQL的MVCC机制详解
Handwritten promise all
#25class的类继承
js强制转换
Let torch cuda. is_ Experience of available() changing from false to true
ZCMU--1367: Data Structure
让torch.cuda.is_available()从false变成true的一点经验
刻录光盘的程序步骤
如何将应用加入到deviceidle 白名单?
DoS及攻擊方法詳解
Data Encryption Standard DES security
股票开账户如何优惠开户?现在在线开户安全么?
VCD-影音光碟