Chinaunix首页 | 论坛 | 博客
  • 博客访问: 185536
  • 博文数量: 60
  • 博客积分: 1597
  • 博客等级: 上尉
  • 技术积分: 461
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-20 13:24
文章分类

全部博文(60)

文章存档

2017年(15)

2016年(6)

2015年(37)

2008年(2)

分类: C/C++

2017-05-23 11:28:40

double threshold(InputArray src, OutputArray dst, double thresh, double maxval, int type)
  • src – input array (single-channel, 8-bit or 32-bit floating point).
  • dst – output array of the same size and type as src.
  • threshthreshold value.
  • maxval – maximum value to use with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.
  • typethresholding type (see the details below).

  • THRESH_BINARY

    .texttt{dst} (x,y) =  .fork{.texttt{maxval}}{if $.texttt{src}(x,y) > .texttt{thresh}$}{0}{otherwise}

  • THRESH_BINARY_INV

    .texttt{dst} (x,y) =  .fork{0}{if $.texttt{src}(x,y) > .texttt{thresh}$}{.texttt{maxval}}{otherwise}

  • THRESH_TRUNC

    .texttt{dst} (x,y) =  .fork{.texttt{threshold}}{if $.texttt{src}(x,y) > .texttt{thresh}$}{.texttt{src}(x,y)}{otherwise}

  • THRESH_TOZERO

    .texttt{dst} (x,y) =  .fork{.texttt{src}(x,y)}{if $.texttt{src}(x,y) > .texttt{thresh}$}{0}{otherwise}

  • THRESH_TOZERO_INV


THRESH_OTSU:函数会用OTSU得到自动动阀值,参数threshold不再起作用。


void adaptiveThreshold(InputArray src, OutputArray dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C) ?

阅读(2489) | 评论(0) | 转发(0) |
0

上一篇:imread

下一篇:opencv 画图

给主人留下些什么吧!~~