【发布时间】:2017-02-20 15:13:41
【问题描述】:
将 [threshold = (mean + std dev)] 与 Otsu Thresholding 一起使用会得到以下结果,
.
而且,没有它们,我得到以下结果,
.
因此,我有三个问题,
(1) 我实现二进制阈值的主要问题是什么?
(2) 如果Otsu Threshold真的给出了很好的结果,为什么文章作者建议使用[threshold = (mean + std dev)]?
(3) 如何应用double 值作为 Otsu 的阈值?
源代码
Here is the GitHub repository.
源码中最相关的部分如下,
private void thresholdButton_Click(object sender, EventArgs e)
{
Bitmap color = (Bitmap)this.inputImagePictureBox.Image;
Bitmap temp = Grayscale.ToGrayscale((Bitmap)color.Clone());
ImageStatistics imgStat = new ImageStatistics(temp);
Histogram histogram = imgStat.Gray;
double meanPlusStdDev = histogram.Mean + histogram.StdDev;
OtsuThreshold otsu = new OtsuThreshold();
int thres = otsu.getOtsuThreshold(temp);//////
//otsu.Apply(temp, (int)meanPlusStdDev);
otsu.Apply(temp, thres);
thresholdedImagePictureBox.Image = temp;
}
【问题讨论】:
-
条件是否相同,即是否在阈值处理之前应用了同态过滤?你能给我们提供一张测试图片吗?
-
@Tapio,这是我的 HomoFilter stackoverflow.com/questions/39427106/homomorphic-filter-output
-
@Tapio,测试图像嵌入到VS2013解决方案中。
标签: c#-4.0 image-processing filtering histogram threshold