Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic threshold methods

Automatic threshold using inter-class variance is described in the NI vision help as shown in figure below. My question is what is the difference between the last two equations; they are exactly the same. what do they indicate ?inter class variance.PNG

0 Kudos
Message 1 of 5
(2,688 Views)

Hi Ahmed_Kotb,

Let me preface this by saying I don't have quite the in-depth knowledge need to for a deeper understanding of the algorithm in question. However, I believe I can provide the information you need.

 

Inter Variance thresholding chooses a threshold value that maximizes the first expression in the image you include. The three equations below that simply provide definitions of the values used in that same equation, and the two in question just happen to be equivalent. If I'm understanding correctly, the algorithm starts with a Histogram. N is the number of bins in that histogram, and I believe p(i) is the value of that index in the histogram. 

Again, I could be wrong as I'm working from the same information as you are in the help documentation. I believe the above is correct, though. 

Charlie J.
National Instruments
0 Kudos
Message 2 of 5
(2,635 Views)
this method is similar to Otsu's method and I think last
expression is not correct in manual and second one should be start from K not zero
0 Kudos
Message 3 of 5
(2,625 Views)

Hi Ahmed,

You are right that there is a type error in the equations. 

On the last equation the summation index is going from i=0 to i=k. Not i=0 to i=N-1.

I was just looking at my favorite book "Digital Image Processing using Matlab" by Gonzalez, Woods and Eddings.

This book has good explanation of  Otsu's method for global thresholding (it is interclass variance) and has the source code in matlab.

Chapter 11.3.3  in the book is "Optimum Global Thresholding Using Otsu's method". 

 

 

Amit Shachaf
0 Kudos
Message 4 of 5
(2,610 Views)

Hi all,

 

With the disclaimer that I am not as familiar with the low level algorithms, I did speak briefly with a colleague and we think there may infact be a typo in the documentation along the lines of what AmitShachaf describes. We're not 100% sure, but I went ahead and filed a Corrective Action Request to have R&D take a closer look at the documentation in question. 

Charlie J.
National Instruments
0 Kudos
Message 5 of 5
(2,593 Views)