//二值化
Image<Gray, Byte> threshimg = new Image<Gray, Byte>(histmi.width, histmi.height);
CvInvoke.cvThreshold(histimage, threshimg, 30, 255, Emgu.CV.CvEnum.THRESH.CV_THRESH_BINARY);
pictureBox4.Image = threshimg.ToBitmap();
ThresholdBinary函数
emgucv提供的方法解释:Threshold the image such that: dst(x,y) = max_value, if src(x,y)>threshold; 0, otherwise。其实和cvThreshold函数中的第一种运算方法,即CV_THRESH_BINARY一样。
Image<Gray, Byte> threshimg= grayimg.ThresholdBinary(new Gray(128), new Gray(255));
cvThreshold 和 ThresholdBinary
最新推荐文章于 2024-08-18 12:05:06 发布