Brain Imaging has been source of several studies in the literature, mostly due to its importanceboth to predict and to analyze certain diseases or conditions. Extracting the brain from patient images for medical analysis can provide useful diagnostic and prognostic information.To this end, digital image processing algorithms have been applied to medical tasks with a focus on the identification of the brain. This work proposes a brain extraction framework based on three major steps: 1) Dataset and Image Selection; 2) Preprocessing; and 3) Largest Connected Component extraction. Our data are obtained from the OASIS dataset.The preprocessing step is applied in order to enhance contrast and eliminate possible noise from the T1-weighted MRI. Largest Connected Component extraction is performed by initially detecting the largest element in the image (i.e. the brain gray matter) and then by extracting it through mathematical morphology operators. The unsupervised framework extracts the brain in different axial slices without adjustments. The main contribution of this work is a method using only digital image processing for automatically identifying the brain from several different slices, which differs from the literature since is performed without parameter resetting. Five metrics were applied to evaluate our results: Specificity, Recall, Accuracy, F-Measure, and Precision. In our first experiment, two metrics resulted in more than 90% in efficiency (Specificity and Precision), two of them surpassed 80% (F-Measure and Accuracy), and Sensitivity exceeded 70%. Our second experiment compares our results with those produced by related works, having been ranked in the top positions of Sensitivity and Specificity.