We present a novel framework to automatically separate brain region from other non-brain regions in head images. The idea of the proposed method is to estimate larger scale patterns in an image and then correct the boundaries iteratively. The scale estimation is based on the recently proposed total variation (TV) regularized L 1 functional. An iterative optimization method, is used to refine non-convex and acute angle boundaries. The final algorithm is able to extract large scale patterns with arbitrary shapes, which is particularly suitable for brain extraction. In order to reduce the computation overhead in 3D data, a multi-level technique is proposed to exponentially improve the speed of the brain extraction process. Based on accurate results of brain extraction, a non-rigid brain registration algorithm is proposed to improve accuracy and consistency of existing registration methods. Experimental results on real 3D brain MR images demonstrate that the proposed methods outperform existing solutions. In addition, results are provided to show that the proposed algorithm can also be used to segment large scale patterns in general images.