当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
Robot engineering lifelong learning and work plan-2022-
datepicket和timepicket,日期、时间选择器的功能和用法
Functions and usage of viewswitch
带动画的列表选中js特效
Toast will display a simple prompt message on the program interface
【重新理解通信模型】Reactor 模式在 Redis 和 Kafka 中的应用
无法链接远程redis服务器(解决办法百分百)
策略模式 - Unity
Functions and usage of viewflipper
深入浅出【机器学习之线性回归】
机器视觉(1)——概述
什么是敏捷测试
VSCode关于C语言的3个配置文件
Cartoon | who is the first ide in the universe?
数字化转型的主要工作
Numberpick的功能和用法
Solid function learning
2021-06-28
本周小贴士#141:注意隐式转换到bool
Establishment of solid development environment