Why does binarization of images show lower results?

enter image description here

Please refer to this journal article .

The last paragraph of section 4.1 (Preprocessing) states that, enter image description here

Using [ ] together with Otsu Thresholding, we get the following result: threshold = (mean + std dev)

enter image description here

.

And without them I get the following result:

enter image description here

.

Therefore, I have three questions:

(1) What is the main problem with my binary threshold implementation?

(2) If the Otsu Threshold really gives a good result, why did the authors suggest using [ threshold = (mean + std dev)]?

(3) How to apply a value doubleas an Otsu threshold?


enter image description here

Source

enter image description here

Here is the GitHub repository.

The most important part of the source code is as follows:

    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;
    }
+4
2

(2). , - + stdev , . . , . Niblack (x, y) (x, y) stdev (x, y) :

(x, y) + k * stdev (x, y)

k - . .

t * (x, y) + k * stdev (x, y)

, stdev. stdev . , , , , .

Sauvola, , Niblack. , .

+2

1) "". , .

2) , . /stdev , ( stdev), () .

3) . , .

+2

Source: https://habr.com/ru/post/1657430/


All Articles