This paper presents a foreground extraction model which develops the Grab Cut model by applying the histogram shape analysis method. In this model, the foreground extraction is formulated as an inference problem based on edges and appearance models. The inference is solved via a minimum cut/maximum flow algorithm scheme, which allows incorporation of edge information and automatic tuning of parameters in appearance models. We use the histogram shape analysis method to analyze the intensity distribution of an image, and estimate the optimal number of regions in order to best model appearances of the foreground and background. The appearance models are defined as a maximum likelihood form instead of the original Gaussian Mixture Models in order to distinguish the small regions in an image. Numerical experimental results on the Berkeley segmentation database and Weizmann horse's database indicate that, compared to existing foreground extraction models, the proposed model provides comparable performance in terms of segmentation metric and computational cost, while being insensitive to the small region in an image.