Skull stripping is an useful technique for segmenting the brain tissue which is used for analysis of neuroimaging data. Thus accurate segmentation of brain tissue by removal of non-brain tissues like skull, muscle/skin, and cerebrospinal fluid is an important task for diagnosis a disease and pre-planning for a surgery. In this paper we present a technique for segmenting the brain from skull in a synthetic T1-weighted magnetic resonance images (MRIs) of the human head collected from Brain web database. The skull-stripping method consists of a series of sequential steps including image enhancement with particle swarm optimization (PSO) to improve the performance, background removal, histogram based thresholding with maximum divergence for extraction of brain region and morphological operation for removal of non-brain tissues. The performance of the proposed method is evaluated in a specific slice of brain image and a synthetic MRI image in terms of Sensitivity (Se), specificity (Sp), precision (Pr) and accuracy (Acc). The evaluated results shows a good detection performance with a global sensitivity of 89.77%, specificity of 97.65%, precision of 97.55% with a accuracy of 93.63% in non-enhanced image and sensitivity of 100%, specificity of 95.79%, precision of 96.11% with a accuracy of 97.94% in PSO based enhanced image. Thus this method could be used for accurate extraction of brain tissues in T1-weighted MRI images of brain.