Efficient Implementation of Niblack Thresholding for MRI Brain Image Segmentation