cvthreshold – 青春部落,流年似水 http://www.youthtribe.com 青春是一场远行,总记不起来时的路。 Fri, 03 May 2013 07:52:59 +0000 zh-CN hourly 1 https://wordpress.org/?v=6.1.6 cvthreshold – 青春部落,流年似水 http://www.youthtribe.com/archives/856 http://www.youthtribe.com/archives/856#respond Fri, 03 May 2013 07:52:40 +0000 http://www.shizhiyou.com/blog/?p=856 cvThreshold
cvThreshold是opencv库中的一个函数
作用:函数 cvThreshold 对单通道数组应用固定阈值操作。该函数的典型应用是对灰度图像进行阈值操作得到二值图像。(cvCmpS 也可以达到此目的) 或者是去掉噪声,例如过滤很小或很大象素值的图像点。本函数支持的对图像取阈值的方法由 threshold_type 确定。
形式:void cvThreshold( const CvArr* src, CvArr* dst, double threshold, double max_value, int threshold_type );
src:原始数组 (单通道 , 8-bit of 32-bit 浮点数)。dst:输出数组,必须与 src 的类型一致,或者为 8-bit。
threshold:阈值
max_value:使用 CV_THRESH_BINARY 和 CV_THRESH_BINARY_INV 的最大值。
threshold_type:阈值类型 threshold_type=CV_THRESH_BINARY:
如果 src(x,y)>threshold ,dst(x,y) = max_value; 否则,dst(x,y)=0;
threshold_type=CV_THRESH_BINARY_INV:
如果 src(x,y)>threshold,dst(x,y) = 0; 否则,dst(x,y) = max_value.
threshold_typ
]]>
http://www.youthtribe.com/archives/856/feed 0