The new algorithm for image threshold segmentation by cumulative histograms of real and hypothetical images is considered. The algorithm operates with a difference from cumulative histogram of real and hypothetical images. To find the threshold the optimization problems are formulated and solved. Testing and experimental results are presented.