A clear partial image of predetermined size can be segmented at high speed. The method for segmenting a partial image from a whole image comprising a plurality of pixels with gray levels comprises the steps of: inputting a number k of pixels of the partial image to be segmented; detecting a partial image maximizing: ##EQU1## where n is the number of pixels of the whole image, g(i, j) is the gray level of a pixel (i, j), . alpha. is a parameter, and |S| is the number of pixels of the partial image S; comparing the number |S| of pixels of the partial image S maximizing U.sub.&agr; (S) with the inputted number k; increasing a value of &agr; if |S| k and decreasing the value of &agr; if |S| k; again executing the steps subsequent to the specifying step using the updated &agr;; and outputting said partial image S which maximizes U. sub.&agr; (S) if |S|=k.
展开▼