A small mistake in the algorithm, mu 1 should be the mean of all grey value in G1 and mu 2 should be the mean of all grey value in G2. Not the number of pixels in G1 / T .
+Kishan D acctually i also had a doubt on this .. but if ypu consider this method that you say then the thresholding becomes same for every image .. Let us consider an example Say my initial threshold is 100 Now this is a constant for any image initial threshold will be the same .. Next mu of g1 will be average of all graylevels below 100 so it will be( 0 + 1 + 2+....+99+100)/100 This will also be a constant since again you are not considering and image pixel. Similarly mu g2 will be average of all graylevels above 100 i.e (101 + 102+ 103...+255)/155 This also will be a constant .. so any image you take the algorithm will give a same threshold ... which is not what we want We want the algorithm to decide a threshold according to the image .. it should decide on the basis of how many pixels are there which can be converted to black or white completely .
@@pratikian if threshold is 100 , you can not tell g1 will be 0+1+2+3.../100. It will completely dependent on the image which we have choosen. Selected image needed not have all grey value from 0 to 100. Say we have a image with 5 pixels with gray values to be 100, 120, 130, 200, 10, Say T is 125, then mu 1 will be 100+120+10 / 3 and mu2 will be 130+200/2.
+Vinay Goud i have given a very basic iterative algorithm in the video where it just compares with the initial threshold and gives a new value for the threshold ..
Thank you for explain but I have question about thresholding with ImageJ .... how I can devise (thresholding) SEM image for calculate size particle in each range Thank you