Openv inRange函数
2015-10-12 09:41
302 查看
void inRange(InputArray [b]src,InputArray lowerb, InputArrayupperb, OutputArray
dst)[/b]
The function checks the range as follows:
· For every elementof a single-channel input array:
· For two-channelarrays:
· and so forth.
That is, dst (I) is set to 255 (all 1 -bits) if src (I) is within thespecified 1D, 2D, 3D, ... box and 0 otherwise.
When the lower and/or upper bounary parameters are scalars, the indexes(I) at lowerb and upperb in the above formulas should be omitted.
个人理解:
例如
dst)[/b]
Parameters: | src – First source array. lowerb – Inclusive lower boundary array or a scalar. upperb – Inclusive upper boundary array or a scalar. dst – Destination array of the same size as src and CV_8U type. |
· For every elementof a single-channel input array:
· For two-channelarrays:
· and so forth.
That is, dst (I) is set to 255 (all 1 -bits) if src (I) is within thespecified 1D, 2D, 3D, ... box and 0 otherwise.
When the lower and/or upper bounary parameters are scalars, the indexes(I) at lowerb and upperb in the above formulas should be omitted.
个人理解:
例如
inRange(rgb,Scalar(0,10,30),Scalar(180,256,256),mask);函数将分别比较rgb的B.G.R三个通道的每个元素是否位于[0,180][10,256][30,256]区间,如果是,mask的相应位设为255,否则为0。
相关文章推荐
- linux 查看磁盘空间大小
- 从零自学Hadoop(11):Hadoop命令上
- 在apache上安装gitweb实现浏览器访问git服务器
- 在centos上搭建git服务器
- operator运算符重载
- 架构师必读经典
- CSDN上的好文章《架构之路》
- tomcat内存溢出的解决方法(java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError:)
- LNMP(linux+nginx+mysql+php)服务器环境配置
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境
- 流操作之读写(fread、fwrite、fopen、malloc)
- linux下删除空行的几种方法
- linux mint 下mysql中文支持问题
- Shell学习:sed命令
- 阿里云 Tomcat 配置域名
- Building GDB and GDBserver for cross debugging / Linux下交叉编译gdb和gdbserver
- ../include/squid_md5.h:27:2: error: #error Cannot find OpenSSL MD5 headers【squid安装中】
- opencv中在屏幕上每隔几秒显示一个点,并且保存点的坐标
- ACdream 1216——Beautiful People——————【二维LIS,nlogn处理】
- linux根目录下各文件夹的作用