This article presents a novel integrated approach to object of interest extraction, including learning to define target pattern and extracting by combining detection and segmentation. The learning stage captures both shape sketch and appearance information of target pattern as prior knowledge. The extraction stage utilizes a stochastic Markov Chain Monte Carlo (MCMC) algorithm under the Bayesian framework. By employing a proposed measurement for the similarity between continuous region boundary and discrete learnt sketch, the shape prior knowledge is embedded into the inference process, playing an important role in segmentation. The experiment shows that our method can perform well for both small and large size objects, even in the occluded case, and outperform the comparable methods.