New Global Thresholding Method for Soil Images by Minimizing Grayscale IntraClass Variance Paper Code convert to C++ using opencv