当前位置:网站首页>Threshold segmentation based on RGB image and threshold adjustment by sliding
Threshold segmentation based on RGB image and threshold adjustment by sliding
2022-07-07 17:41:00 【AI cannon fodder】
Catalog
1. Overview of color segmentation
1. Overview of color segmentation
Threshold segmentation of image color , We often don't know how appropriate the threshold is , It needs constant testing , In response to this problem , Slider with threshold set , Thus, you can quickly find the threshold by sliding the slider .
The most common threshold segmentation is R、G、B Threshold segmentation , That is, to judge the pixel R、G、B Whether the value is greater than or less than a certain threshold , The points that meet the conditions are retained or deleted .
The algorithm of threshold segmentation in this code is to traverse each pixel of the image directly by row and column , Judge whether the value of the pixel meets the segmentation conditions , Meet the requirement of setting the point to black to achieve the effect of segmentation . The code is threshold 、 R、G、B、 And mode are set with slider , The modes are 4 Kind of :
0----RGB R、G、B Points with values greater than the threshold are set to black
1----|G-R| G-R The absolute value of the value is less than threshod_value The point of is set to black
2----|2G-R-B| 2G-R-B The absolute value of value is greater than threshod_value The point of is set to black
3----G/R
边栏推荐
猜你喜欢
随机推荐
【网络攻防原理与技术】第6章:特洛伊木马
三仙归洞js小游戏源码
Mysql 索引命中级别分析
MySQL index hit level analysis
【TPM2.0原理及应用指南】 5、7、8章
简单的loading动画
深度学习机器学习各种数据集汇总地址
本周小贴士#136:无序容器
使用popupwindow創建对话框风格的窗口
【可信计算】第十一次课:TPM密码资源管理(三) NV索引与PCR
Problems encountered in Jenkins' release of H5 developed by uniapp
Functions and usage of viewswitch
Alertdialog create dialog
LeetCode 648(C#)
LeetCode 497(C#)
calendarview日历视图组件的功能和用法
【OKR目标管理】案例分析
mysql官网下载:Linux的mysql8.x版本(图文详解)
Enum + Validation 的个人最佳实践 demo 分享
专精特新软件开发类企业实力指数发布,麒麟信安荣誉登榜