Development of fully automatic brain extraction methods for magnetic resonance imaging head scans and detection of abnormality in brain