That is to say, in order to make the Otsu threshold segmentation method more adaptable, the probability of occurrence of the pixel, whose gray value is the threshold value in the grayscale distribution histogram, is first added as a weighting factor to improve the algorithm.